summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-06 18:15:40 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-06 18:15:40 +0000
commit8d90007fe70a0a4c5a5336a565b4c08681cb0229 (patch)
treed27c779f119046d0417b26575535f2b29c302576
parente316bee274f1b015950a40fb52076410194c9b86 (diff)
downloadimport-8d90007fe70a0a4c5a5336a565b4c08681cb0229.tar.gz
fix test
-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__':