summaryrefslogtreecommitdiff
path: root/exts/pip_find_deps_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'exts/pip_find_deps_tests.py')
-rwxr-xr-xexts/pip_find_deps_tests.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/exts/pip_find_deps_tests.py b/exts/pip_find_deps_tests.py
index a98bc73..5862c13 100755
--- a/exts/pip_find_deps_tests.py
+++ b/exts/pip_find_deps_tests.py
@@ -17,13 +17,13 @@
import unittest
import pip_find_deps
-import pkg_resources
+from pkg_resources import parse_requirements, parse_version
class ConflictDetectionTests(unittest.TestCase):
def setUp(self):
reqs = ['a == 0.1', 'a == 0.2']
- self.test_requirements = pkg_resources.parse_requirements(reqs)
+ self.test_requirements = parse_requirements(reqs)
# ('==', '0.1') conflicts with ('<', 0.1)
# ('==', '0.1') conflicts with ('>', 0.1)
@@ -40,8 +40,11 @@ class ConflictDetectionTests(unittest.TestCase):
self.assertEqual(len(deps), 1)
- #dep = deps.popitem()
- #self.assertEqual(len(dep.conflicts), 1)
+ _, dep = deps.popitem()
+
+ self.assertEqual(len(dep.conflicts), 1)
+ self.assertEqual(dep.conflicts, [(('==', parse_version('0.1')),
+ ('==', parse_version('0.2')))])
if __name__ == '__main__':