From: Daira Hopwood Date: Tue, 28 Jul 2015 22:41:26 +0000 (+0100) Subject: test_version.py: minor cleanup. X-Git-Tag: allmydata-tahoe-1.10.2b1~3^2 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/biz/?a=commitdiff_plain;h=023f9fa4d3f9763181045b3b4a44e73419e2ac5f;p=tahoe-lafs%2Ftahoe-lafs.git test_version.py: minor cleanup. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_version.py b/src/allmydata/test/test_version.py index 8c605303..7851f91a 100644 --- a/src/allmydata/test/test_version.py +++ b/src/allmydata/test/test_version.py @@ -114,14 +114,14 @@ class CheckRequirement(unittest.TestCase): self.failUnlessEqual(res, []) res = cross_check({"argparse": ("unparseable", "")}, []) - self.failUnlessEqual(len(res), 0) + self.failUnlessEqual(res, []) res = cross_check({}, [("foo", ("unparseable", "", None))]) self.failUnlessEqual(len(res), 1) self.failUnlessIn("not found by pkg_resources", res[0]) res = cross_check({"distribute": ("1.0", "/somewhere")}, [("setuptools", ("2.0", "/somewhere", "distribute"))]) - self.failUnlessEqual(len(res), 0) + self.failUnlessEqual(res, []) res = cross_check({"distribute": ("1.0", "/somewhere")}, [("setuptools", ("2.0", "/somewhere", None))]) self.failUnlessEqual(len(res), 1) @@ -132,7 +132,7 @@ class CheckRequirement(unittest.TestCase): self.failUnlessIn("location mismatch", res[0]) res = cross_check({"zope.interface": ("1.0", "")}, [("zope.interface", ("unknown", "", None))]) - self.failUnlessEqual(len(res), 0) + self.failUnlessEqual(res, []) res = cross_check({"foo": ("1.0", "")}, [("foo", ("unknown", "", None))]) self.failUnlessEqual(len(res), 1) @@ -142,13 +142,13 @@ class CheckRequirement(unittest.TestCase): # the version and the path fail to match. res = cross_check({"foo": ("1.0", "/somewhere")}, [("foo", ("2.0", "/somewhere", None))]) - self.failUnlessEqual(len(res), 0) + self.failUnlessEqual(res, []) res = cross_check({"foo": ("1.0", "/somewhere")}, [("foo", ("1.0", "/somewhere_different", None))]) - self.failUnlessEqual(len(res), 0) + self.failUnlessEqual(res, []) res = cross_check({"foo": ("1.0-r123", "/somewhere")}, [("foo", ("1.0.post123", "/somewhere_different", None))]) - self.failUnlessEqual(len(res), 0) + self.failUnlessEqual(res, []) res = cross_check({"foo": ("1.0", "/somewhere")}, [("foo", ("2.0", "/somewhere_different", None))]) self.failUnlessEqual(len(res), 1)