[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests -
test_cvsloader.py:1.7
Fred L. Drake, Jr.
fred at zope.com
Wed Mar 10 13:57:20 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv27722/zpkgtools/tests
Modified Files:
test_cvsloader.py
Log Message:
when a FileProxy is created from a URL, use the URL as the .name attribute
=== Packages/zpkgtools/zpkgtools/tests/test_cvsloader.py 1.6 => 1.7 ===
--- Packages/zpkgtools/zpkgtools/tests/test_cvsloader.py:1.6 Wed Mar 10 13:18:26 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_cvsloader.py Wed Mar 10 13:57:19 2004
@@ -491,6 +491,16 @@
expected = open(__file__, self.mode).read()
self.assertEqual(text, expected)
+ def test_url_as_name(self):
+ # make sure the path is used by default:
+ self.assertEqual(self.fp.name, __file__)
+ # now
+ fp = cvsloader.FileProxy(__file__, self.mode, self.loader, "fake:url")
+ try:
+ self.assertEqual(fp.name, "fake:url")
+ finally:
+ fp.close()
+
def test_suite():
suite = unittest.makeSuite(UrlUtilitiesTestCase)
More information about the Zope-CVS
mailing list