[Zope3-checkins] CVS: Zope3 - test.py:1.82

Fred L. Drake, Jr. fred at zope.com
Tue Jan 20 11:49:03 EST 2004


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv10820

Modified Files:
	test.py 
Log Message:
make -F and out of place builds (-b) work; there's no need to chdir
twice!


=== Zope3/test.py 1.81 => 1.82 ===
--- Zope3/test.py:1.81	Thu Jan 15 16:17:46 2004
+++ Zope3/test.py	Tue Jan 20 11:49:01 2004
@@ -369,7 +369,7 @@
                 self.inplace = True
         # Calculate which directories we're going to add to sys.path, and cd
         # to the appropriate working directory
-        org_cwd = os.getcwd()
+        self.org_cwd = os.getcwd()
         if self.inplace:
             self.libdir = "src"
         else:
@@ -382,7 +382,7 @@
         global functional
         kind = functional and "functional" or "unit"
         if libdir:
-            extra = os.path.join(org_cwd, libdir)
+            extra = os.path.join(self.org_cwd, libdir)
             print "Running %s tests from %s" % (kind, extra)
             self.libdir = extra
             sys.path.insert(0, extra)
@@ -697,6 +697,8 @@
     else:
         runner(files, test_filter, debug)
 
+    os.chdir(pathinit.org_cwd)
+
 
 def process_args(argv=None):
     import getopt
@@ -765,7 +767,7 @@
         elif k in ("-b", "--build"):
             build = True
         elif k == "-B":
-             build = build_inplace = True
+            build = build_inplace = True
         elif k == "-c":
             # make sure you have a recent version of pychecker
             if not os.environ.get("PYCHECKER"):




More information about the Zope3-Checkins mailing list