SVN: zpkgtools/trunk/zpkgtools/ when reading a map that is under revision control, do not pretend to look

"Fred L. Drake, Jr." <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Log message for revision 37852:
  when reading a map that is under revision control, do not pretend to look
  at the repository; that is just silly
  

Changed:
  U   zpkgtools/trunk/zpkgtools/locationmap.py
  U   zpkgtools/trunk/zpkgtools/tests/test_locationmap.py

-=-
Modified: zpkgtools/trunk/zpkgtools/locationmap.py
===================================================================
--- zpkgtools/trunk/zpkgtools/locationmap.py	2005-08-10 21:51:15 UTC (rev 37851)
+++ zpkgtools/trunk/zpkgtools/locationmap.py	2005-08-10 23:10:19 UTC (rev 37852)
@@ -263,11 +263,7 @@
     if os.path.isfile(path):
         # prefer a revision-control URL over a local path if possible:
         # XXX why????  this doesn't make much sense
-        rcurl = loader.fromPath(path)
-        if rcurl is None:
-            base = urlutils.file_url(path)
-        else:
-            base = loader.baseUrl(rcurl)
+        base = urlutils.file_url(path)
         f = open(path, "rU")
     else:
         try:

Modified: zpkgtools/trunk/zpkgtools/tests/test_locationmap.py
===================================================================
--- zpkgtools/trunk/zpkgtools/tests/test_locationmap.py	2005-08-10 21:51:15 UTC (rev 37851)
+++ zpkgtools/trunk/zpkgtools/tests/test_locationmap.py	2005-08-10 23:10:19 UTC (rev 37852)
@@ -266,28 +266,6 @@
         self.list.append(record)
 
 
-class CvsWorkingDirectoryTestCase(CvsWorkingDirectoryBase):
-    """Tests that rely on a CVS working directory."""
-
-    def setUp(self):
-        super(CvsWorkingDirectoryTestCase, self).setUp()
-        self.initialize(":ext:cvs.example.org:/cvsroot", "module")
-        self.packages_txt = os.path.join(self.workingdir, "PACKAGES.txt")
-        f = open(self.packages_txt, "w")
-        f.write(SAMPLE_INPUT_WITH_REPOSITORY_URLS)
-        f.close()
-
-    def test_fromPathOrUrl_from_cvs_workdir(self):
-        mapping = locationmap.fromPathOrUrl(self.packages_txt)
-        self.assertEqual(mapping, EXPECTED_OUTPUT)
-
-    def test_fromPathOrUrl_passes_mapping(self):
-        d = {"other": "over-there"}
-        mapping = locationmap.fromPathOrUrl(self.packages_txt, mapping=d)
-        self.assertEqual(d.pop("other"), "over-there")
-        self.assertEqual(d, EXPECTED_OUTPUT)
-
-
 class LocationMapTestCase(unittest.TestCase):
     """Tests of the convenience mapping used as the CVS mapping storage.
 
@@ -387,7 +365,6 @@
 
 def test_suite():
     suite = unittest.makeSuite(LoadTestCase)
-    suite.addTest(unittest.makeSuite(CvsWorkingDirectoryTestCase))
     suite.addTest(unittest.makeSuite(LocationMapTestCase))
     return suite
 

_______________________________________________
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.