[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests -
test_dependencies.py:1.2
Fred L. Drake, Jr.
fred at zope.com
Wed Mar 17 11:42:25 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv4438/tests
Modified Files:
test_dependencies.py
Log Message:
we care about packages, not modules, so rename an instance var
=== Packages/zpkgtools/zpkgtools/tests/test_dependencies.py 1.1 => 1.2 ===
--- Packages/zpkgtools/zpkgtools/tests/test_dependencies.py:1.1 Fri Mar 5 16:39:22 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_dependencies.py Wed Mar 17 11:42:24 2004
@@ -25,7 +25,7 @@
def test_empty_file(self):
sio = StringIO("")
deps = dependencies.load(sio)
- self.assert_(not deps.modules)
+ self.assert_(not deps.packages)
self.assert_(not deps.others)
def test_empty_file_with_comments(self):
@@ -34,18 +34,18 @@
# So is this.
""")
deps = dependencies.load(sio)
- self.assert_(not deps.modules)
+ self.assert_(not deps.packages)
self.assert_(not deps.others)
- def test_just_modules(self):
+ def test_just_packages(self):
sio = StringIO("""\
zope.foo
zope.app.bar
""")
deps = dependencies.load(sio)
- self.assertEqual(len(deps.modules), 2)
- self.assert_("zope.foo" in deps.modules)
- self.assert_("zope.app.bar" in deps.modules)
+ self.assertEqual(len(deps.packages), 2)
+ self.assert_("zope.foo" in deps.packages)
+ self.assert_("zope.app.bar" in deps.packages)
self.assert_(not deps.others)
def test_just_others(self):
@@ -54,12 +54,12 @@
feature:zope.bar
""")
deps = dependencies.load(sio)
- self.assert_(not deps.modules)
+ self.assert_(not deps.packages)
self.assertEqual(len(deps.others), 2)
self.assert_("not-a-module" in deps.others)
self.assert_("feature:zope.bar" in deps.others)
- def test_modules_and_others(self):
+ def test_packages_and_others(self):
sio = StringIO("""\
not-a-module
zope.foo
@@ -68,9 +68,9 @@
feature:zope.bar
""")
deps = dependencies.load(sio)
- self.assertEqual(len(deps.modules), 2)
- self.assert_("zope.foo" in deps.modules)
- self.assert_("zope.app.bar" in deps.modules)
+ self.assertEqual(len(deps.packages), 2)
+ self.assert_("zope.foo" in deps.packages)
+ self.assert_("zope.app.bar" in deps.packages)
self.assertEqual(len(deps.others), 2)
self.assert_("not-a-module" in deps.others)
self.assert_("feature:zope.bar" in deps.others)
@@ -85,11 +85,11 @@
zope.yeahright
""")
deps = dependencies.load(sio)
- self.assertEqual(len(deps.modules), 2)
+ self.assertEqual(len(deps.packages), 2)
self.assertEqual(len(deps.others), 1)
- self.assert_("feature:but-not-really" not in deps.modules)
+ self.assert_("feature:but-not-really" not in deps.packages)
self.assert_("feature:but-not-really" not in deps.others)
- self.assert_("zope.yeahright" not in deps.modules)
+ self.assert_("zope.yeahright" not in deps.packages)
self.assert_("zope.yeahright" not in deps.others)
More information about the Zope-CVS
mailing list