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

"Fred L. Drake, Jr." <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
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://[email protected]: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):

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.