[Zope-CVS] SVN: zpkgtools/trunk/ clean up and improve one test based on the jim-relpath branch

Fred L. Drake, Jr. fdrake at gmail.com
Thu Jun 9 10:46:37 EDT 2005


Log message for revision 30707:
  clean up and improve one test based on the jim-relpath branch

Changed:
  U   zpkgtools/trunk/bin/zpkg
  U   zpkgtools/trunk/test.py
  U   zpkgtools/trunk/zpkgtools/tests/test_locationmap.py

-=-
Modified: zpkgtools/trunk/bin/zpkg
===================================================================
--- zpkgtools/trunk/bin/zpkg	2005-06-09 14:41:22 UTC (rev 30706)
+++ zpkgtools/trunk/bin/zpkg	2005-06-09 14:46:36 UTC (rev 30707)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.3
+#!/usr/bin/env python2.4
 ##############################################################################
 #
 # Copyright (c) 2004 Zope Corporation and Contributors.

Modified: zpkgtools/trunk/test.py
===================================================================
--- zpkgtools/trunk/test.py	2005-06-09 14:41:22 UTC (rev 30706)
+++ zpkgtools/trunk/test.py	2005-06-09 14:46:36 UTC (rev 30707)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.3
+#!/usr/bin/env python2.4
 ##############################################################################
 #
 # Copyright (c) 2004 Zope Corporation and Contributors.

Modified: zpkgtools/trunk/zpkgtools/tests/test_locationmap.py
===================================================================
--- zpkgtools/trunk/zpkgtools/tests/test_locationmap.py	2005-06-09 14:41:22 UTC (rev 30706)
+++ zpkgtools/trunk/zpkgtools/tests/test_locationmap.py	2005-06-09 14:46:36 UTC (rev 30707)
@@ -235,25 +235,24 @@
 
     def test_load_w_relative_paths(self):
         map_file = StringIO('''
-foo     svn+ssh://svn.zope.org/repos/main/Foo/trunk/src/foo
-bar     ../../bar
-baz     baz
-spam    file://spam.com/spam
-tools   cvs://anonymous@cvs.sourceforge.net:pserver/'''
-      '''cvsroot/python:python/n\ondist/sandbox/setuptools/setuptools
-        ''')
+          foo     svn+ssh://svn.zope.org/repos/main/Foo/trunk/src/foo
+          bar     ../../bar
+          baz     baz
+          ''')
 
         old_getcwd = os.getcwd
         os.getcwd = lambda: '/home/dudette/python/project'
-
         try:
-            locationmap.load(map_file, 'http://acme.com/xxx', self.mapping)
+            locationmap.load(map_file, 'http://acme.com/xxx/yyy/',
+                             self.mapping)
         finally:
             os.getcwd = old_getcwd
 
         self.assertEqual(
             self.mapping['foo'],
             'svn+ssh://svn.zope.org/repos/main/Foo/trunk/src/foo')
+        self.assertEqual(self.mapping['bar'], 'http://acme.com/bar')
+        self.assertEqual(self.mapping['baz'], 'http://acme.com/xxx/yyy/baz')
 
 
 class CollectingHandler(logging.Handler):



More information about the Zope-CVS mailing list