diff --git a/.gitignore b/.gitignore index f338579cc889b98dfa1940db51cdc4f714ad8479..67eac53b45cd59a8db7b5e988128fb80bece7faf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ dist/* *.egg-info *.pyc + +.coverage diff --git a/tests/requirements.txt b/tests/requirements.txt index 4a545b21000d12a9bd8277f13835031616228821..c28d83eb59417e45937be95328d3224a587a81d7 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,3 +2,5 @@ black build flake8 pylint +pytest +pytest-cov diff --git a/tests/test_cool_module.py b/tests/test_cool_module.py new file mode 100644 index 0000000000000000000000000000000000000000..da1002b8b66176f7efb5e24c3b4748d0eb49ed51 --- /dev/null +++ b/tests/test_cool_module.py @@ -0,0 +1,13 @@ +"""Testing of the Cool Module""" +from unittest import TestCase + +from map.cool_module import greeter + + +class TestCoolModule(TestCase): + """Test Case of the Cool Module""" + + def test_greeter(self): + """Testing that the greeter does not crash""" + greeter() + self.assertEqual(2 + 2, 4) diff --git a/tox.ini b/tox.ini index 0a543846c5054ba00d7b41e1226a2232da046279..0c73407b467025c899dbf77bd869e9633a6f0356 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,7 @@ deps = -r{toxinidir}/tests/requirements.txt commands = {envpython} --version + {envpython} -m pytest --cov=map # Use generative name and command prefixes to reuse the same virtualenv # for all linting jobs. @@ -28,7 +29,7 @@ commands = black: {envpython} -m black --version black: {envpython} -m black --check --diff . pylint: {envpython} -m pylint --version - pylint: {envpython} -m pylint map + pylint: {envpython} -m pylint map tests [testenv:build] usedevelop = False