[zpkg] SVN: zpkgtools/trunk/zpkgtools/tests/test_app.py clean up some handling of file: URLs in test code

Fred L. Drake, Jr. fdrake at gmail.com
Mon Sep 19 15:12:09 EDT 2005


Log message for revision 38531:
  clean up some handling of file: URLs in test code

Changed:
  U   zpkgtools/trunk/zpkgtools/tests/test_app.py

-=-
Modified: zpkgtools/trunk/zpkgtools/tests/test_app.py
===================================================================
--- zpkgtools/trunk/zpkgtools/tests/test_app.py	2005-09-19 19:03:19 UTC (rev 38530)
+++ zpkgtools/trunk/zpkgtools/tests/test_app.py	2005-09-19 19:12:08 UTC (rev 38531)
@@ -295,7 +295,7 @@
 
     def setUp(self):
         self.tmpdir = tempfile.mkdtemp(prefix="test-app-")
-        self.mypkg_url = "file://" + urllib.pathname2url(self.tmpdir)
+        self.mypkg_url = urlutils.file_url(self.tmpdir)
         self.ip = include.InclusionProcessor(loader.Loader())
 
     def write_app_file(self, name, text):
@@ -416,13 +416,13 @@
         shutil.copy(os.path.join(input, "packages.map"), package_map)
         self.extra_files.append(package_map)
         zpkgsetup_path = os.path.abspath(zpkgsetup.__path__[0])
-        zpkgsetup_path = "file://" + urllib.pathname2url(zpkgsetup_path)
+        zpkgsetup_path = urlutils.file_url(zpkgsetup_path)
         f = open(package_map, "a")
         print >>f
         print >>f, "zpkgsetup", zpkgsetup_path
         f.close()
         # convert package_map to URL so relative names are resolved properly
-        return "file://" + urllib.pathname2url(package_map)
+        return urlutils.file_url(package_map)
 
     def test_create_tarball(self):
         # This builds a package and checks that the distribution



More information about the zpkg mailing list