[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests - test_cvsloader.py:1.4

Fred L. Drake, Jr. fred at zope.com
Tue Mar 9 13:53:34 EST 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv18043/tests

Modified Files:
	test_cvsloader.py 
Log Message:
move the join() method from RepositoryUrl to CvsUrl; each revision control
system needs to define an appropriate .join() method; it does not make sense
for RepositoryUrl to know about all of them


=== Packages/zpkgtools/zpkgtools/tests/test_cvsloader.py 1.3 => 1.4 ===
--- Packages/zpkgtools/zpkgtools/tests/test_cvsloader.py:1.3	Tue Mar  9 11:11:24 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_cvsloader.py	Tue Mar  9 13:53:34 2004
@@ -71,7 +71,7 @@
         repo = cvsloader.RepositoryUrl("/absolute/path")
         cvsurl = cvsloader.CvsUrl("", "cvs.example.org", "/cvsroot",
                                   "project/module")
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assert_(not result.type)
         self.assertEqual(result.host, "cvs.example.org")
         self.assertEqual(result.cvsroot, "/cvsroot")
@@ -79,7 +79,7 @@
         self.assert_(not result.tag)
 
         cvsurl.tag = "TAG"
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assert_(not result.type)
         self.assertEqual(result.host, "cvs.example.org")
         self.assertEqual(result.cvsroot, "/cvsroot")
@@ -87,12 +87,12 @@
         self.assertEqual(result.tag, "TAG")
 
         repo.tag = "FOO"
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assertEqual(result.path, "absolute/path")
         self.assertEqual(result.tag, "FOO")
 
         cvsurl.tag = None
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assertEqual(result.path, "absolute/path")
         self.assertEqual(result.tag, "FOO")
 
@@ -100,7 +100,7 @@
         repo = cvsloader.RepositoryUrl("relative/path")
         cvsurl = cvsloader.CvsUrl("", "cvs.example.org", "/cvsroot",
                                   "project/module")
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assert_(not result.type)
         self.assertEqual(result.host, "cvs.example.org")
         self.assertEqual(result.cvsroot, "/cvsroot")
@@ -108,7 +108,7 @@
         self.assert_(not result.tag)
 
         cvsurl.tag = "TAG"
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assert_(not result.type)
         self.assertEqual(result.host, "cvs.example.org")
         self.assertEqual(result.cvsroot, "/cvsroot")
@@ -116,12 +116,12 @@
         self.assertEqual(result.tag, "TAG")
 
         repo.tag = "FOO"
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assertEqual(result.path, "project/module/relative/path")
         self.assertEqual(result.tag, "FOO")
 
         cvsurl.tag = None
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assertEqual(result.path, "project/module/relative/path")
         self.assertEqual(result.tag, "FOO")
 
@@ -129,7 +129,7 @@
         repo = cvsloader.RepositoryUrl(None)
         cvsurl = cvsloader.CvsUrl("", "cvs.example.org", "/cvsroot",
                                   "project/module")
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assert_(not result.type)
         self.assertEqual(result.host, "cvs.example.org")
         self.assertEqual(result.cvsroot, "/cvsroot")
@@ -137,7 +137,7 @@
         self.assert_(not result.tag)
 
         cvsurl.tag = "TAG"
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assert_(not result.type)
         self.assertEqual(result.host, "cvs.example.org")
         self.assertEqual(result.cvsroot, "/cvsroot")
@@ -145,12 +145,12 @@
         self.assertEqual(result.tag, "TAG")
 
         repo.tag = "FOO"
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assertEqual(result.path, "project/module")
         self.assertEqual(result.tag, "FOO")
 
         cvsurl.tag = None
-        result = repo.join(cvsurl)
+        result = cvsurl.join(repo)
         self.assertEqual(result.path, "project/module")
         self.assertEqual(result.tag, "FOO")
 




More information about the Zope-CVS mailing list