[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests -
test_package.py:1.2
Fred L. Drake, Jr.
fred at zope.com
Thu Mar 18 13:05:00 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv2677
Modified Files:
test_package.py
Log Message:
update tests; some temp files are needed for some tests now that we're
performing globs for the "documentation" and "script" keys in
package.conf
=== Packages/zpkgtools/zpkgtools/tests/test_package.py 1.1 => 1.2 ===
--- Packages/zpkgtools/zpkgtools/tests/test_package.py:1.1 Mon Mar 15 16:49:08 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_package.py Thu Mar 18 13:04:58 2004
@@ -35,7 +35,10 @@
shutil.rmtree(self.tmpdir)
def write_config(self, text):
- f = open(os.path.join(self.tmpdir, package.PACKAGE_CONF), "w")
+ self.write_file(package.PACKAGE_CONF, text)
+
+ def write_file(self, name, text):
+ f = open(os.path.join(self.tmpdir, name), "w")
f.write(text)
f.close()
@@ -66,6 +69,12 @@
" depends-on innerds.c\n"
" language C\n"
"</extension>\n")
+ os.mkdir(os.path.join(self.tmpdir, "doc"))
+ self.write_file(os.path.join("doc", "README.txt"),
+ "docs go here")
+ os.mkdir(os.path.join(self.tmpdir, "bin"))
+ self.write_file(os.path.join("bin", "runme.py"),
+ "#!/bin/sh\nexit\n")
pkginfo = package.loadPackageInfo("foo", self.tmpdir, "bar")
eq = self.assertEqual
eq(len(pkginfo.extensions), 1)
More information about the Zope-CVS
mailing list