diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-10 17:22:48 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-10 17:22:48 +0000 |
commit | 9529196554fed59928f2d6e6725e68c466325e92 (patch) | |
tree | a90127d6cf9e6749226e3a26f44cf602b3d442c8 | |
parent | bfbda3066e5f7f6b5a0e4d61acf07911814eddc9 (diff) | |
download | import-9529196554fed59928f2d6e6725e68c466325e92.tar.gz |
Add test_less_than_or_equal
-rwxr-xr-x | exts/pip_find_deps_tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/exts/pip_find_deps_tests.py b/exts/pip_find_deps_tests.py index 7ace976..2c66a8a 100755 --- a/exts/pip_find_deps_tests.py +++ b/exts/pip_find_deps_tests.py @@ -121,6 +121,18 @@ class ConflictDetectionTests(unittest.TestCase): self.run_conflict_test(reverse(requirements), [reverse(expected_conflict)]) + def test_less_than_or_equal(self): + requirements = list(parse_requirements(['a <= 0.1', 'a == 0.1'])) + + # No conflict expected here, + # for now it's enough to see that the list of conflicts is empty + deps = pip_find_deps.resolve_version_constraints(requirements) + + self.assertEqual(len(deps), 1) + + _, dep = deps.popitem() + self.assertEqual(len(dep.conflicts), 0) + if __name__ == '__main__': suite = unittest.TestLoader().loadTestsFromTestCase(ConflictDetectionTests) unittest.TextTestRunner(verbosity=2).run(suite) |