[Zope-CVS] SVN: zpkgtools/trunk/zpkgtools/ - add a test that the
zpkgsetup package was copied into the Support/
Fred L. Drake, Jr.
fdrake at gmail.com
Wed Aug 31 14:11:43 EDT 2005
Log message for revision 38204:
- add a test that the zpkgsetup package was copied into the Support/
directory properly, and fix the bug that it was not
- avoid assumptions about the structure of support packages
Changed:
U zpkgtools/trunk/zpkgtools/app.py
U zpkgtools/trunk/zpkgtools/tests/test_app.py
-=-
Modified: zpkgtools/trunk/zpkgtools/app.py
===================================================================
--- zpkgtools/trunk/zpkgtools/app.py 2005-08-31 17:50:28 UTC (rev 38203)
+++ zpkgtools/trunk/zpkgtools/app.py 2005-08-31 18:11:43 UTC (rev 38204)
@@ -41,7 +41,7 @@
def package_resource(package):
- dir = os.path.dirname(os.path.abspath(package.__path__[0]))
+ dir = os.path.abspath(package.__path__[0])
return urlutils.file_url(dir)
DEFAULT_SUPPORT_PACKAGES = [
@@ -302,9 +302,9 @@
self.logger.debug("loading resource '%s' from %s",
name, url)
source = self.loader.load_mutable_copy(url)
- tests_dir = os.path.join(source, "tests")
- if os.path.exists(tests_dir):
- rmtree_force(tests_dir)
+## tests_dir = os.path.join(source, "tests")
+## if os.path.exists(tests_dir):
+## rmtree_force(tests_dir)
self.ip.copyTree(source, destination)
Modified: zpkgtools/trunk/zpkgtools/tests/test_app.py
===================================================================
--- zpkgtools/trunk/zpkgtools/tests/test_app.py 2005-08-31 17:50:28 UTC (rev 38203)
+++ zpkgtools/trunk/zpkgtools/tests/test_app.py 2005-08-31 18:11:43 UTC (rev 38204)
@@ -471,6 +471,10 @@
self.assert_(isfile(pd, "Support", "MANIFEST"))
self.assert_(isfile(pd, "Support", "README.txt"))
self.assert_(isfile(pd, "Support", "setup.py"))
+ # Check for a few things inside the support packages themselves,
+ # to make sure we copied in the right thing:
+ self.assert_(isfile(pd, "Support", "zpkgsetup", "__init__.py"))
+ self.assert_(isfile(pd, "Support", "zpkgsetup", "setup.py"))
finally:
shutil.rmtree(pd)
More information about the Zope-CVS
mailing list