summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 17:25:23 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 17:25:23 +0000
commite3fd4059a9a52605b0b6e6ac0894ac7d3edd3e0c (patch)
treecf76e4ae02a01fd07525f6a141d3c4a76cb4e563
parent9529196554fed59928f2d6e6725e68c466325e92 (diff)
downloadimport-e3fd4059a9a52605b0b6e6ac0894ac7d3edd3e0c.tar.gz
also test reverse
-rwxr-xr-xexts/pip_find_deps_tests.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/exts/pip_find_deps_tests.py b/exts/pip_find_deps_tests.py
index 2c66a8a..7b9c1be 100755
--- a/exts/pip_find_deps_tests.py
+++ b/exts/pip_find_deps_tests.py
@@ -121,9 +121,7 @@ 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']))
-
+ def run_test_no_conflict(self, requirements):
# 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)
@@ -133,6 +131,15 @@ class ConflictDetectionTests(unittest.TestCase):
_, dep = deps.popitem()
self.assertEqual(len(dep.conflicts), 0)
+ def test_less_than_or_equal(self):
+ requirements = list(parse_requirements(['a <= 0.1', 'a == 0.1']))
+
+ self.run_test_no_conflict(requirements)
+ self.run_test_no_conflict(reverse(requirements))
+
+ #def test_greater_than_or_equal(self):
+ # requirements = list(parse_requirements(['a' >= ]))
+
if __name__ == '__main__':
suite = unittest.TestLoader().loadTestsFromTestCase(ConflictDetectionTests)
unittest.TextTestRunner(verbosity=2).run(suite)