diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | test-requirements.txt | 1 | ||||
| -rw-r--r-- | tests.py | 9 | ||||
| -rw-r--r-- | tox.ini | 12 |
4 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a0ce11 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.mypy_cache +.pytest_cache +.tox diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..e079f8a --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +pytest diff --git a/tests.py b/tests.py new file mode 100644 index 0000000..bacfbf1 --- /dev/null +++ b/tests.py @@ -0,0 +1,9 @@ +import mfdiff + + +class TestManifestToDict(object): + + def test_empty_file_returns_empty_dict(self, tmpdir): + manifest_file = tmpdir.join('manifest') + manifest_file.write('') + assert mfdiff.manifest_to_dict(str(manifest_file)) == {} @@ -0,0 +1,12 @@ +[tox] +envlist = py27 +skip_install=true +skipsdist=true + +[testenv] +deps= + -rtest-requirements.txt +commands= + pytest tests.py +# We need sitepackages because python-apt isn't in PyPI +sitepackages=true |
