From 8d90007fe70a0a4c5a5336a565b4c08681cb0229 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Thu, 6 Nov 2014 18:15:40 +0000 Subject: fix test --- exts/pip_find_deps_tests.py | 11 +++++++---- 1 file 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__': -- cgit v1.2.1