[Zope3-checkins] SVN: zope.testing/branches/3.10/ Fixed a test which fails if there is a file named `Data.fs` in the current working directory.

Michael Howitz mh at gocept.com
Thu Nov 3 08:29:25 UTC 2011


Log message for revision 123277:
  Fixed a test which fails if there is a file named `Data.fs` in the current working directory.
  

Changed:
  U   zope.testing/branches/3.10/CHANGES.txt
  U   zope.testing/branches/3.10/src/zope/testing/setupstack.txt

-=-
Modified: zope.testing/branches/3.10/CHANGES.txt
===================================================================
--- zope.testing/branches/3.10/CHANGES.txt	2011-11-03 08:25:59 UTC (rev 123276)
+++ zope.testing/branches/3.10/CHANGES.txt	2011-11-03 08:29:25 UTC (rev 123277)
@@ -1,6 +1,13 @@
 zope.testing Changelog
 **********************
 
+3.10.3 (unreleased)
+===================
+
+- Fixed test which fails if there is a file named `Data.fs` in the current
+  working directory.
+
+
 3.10.2 (2010-11-30)
 ===================
 

Modified: zope.testing/branches/3.10/src/zope/testing/setupstack.txt
===================================================================
--- zope.testing/branches/3.10/src/zope/testing/setupstack.txt	2011-11-03 08:25:59 UTC (rev 123276)
+++ zope.testing/branches/3.10/src/zope/testing/setupstack.txt	2011-11-03 08:29:25 UTC (rev 123277)
@@ -8,7 +8,7 @@
 automating test tear down.  It provides a generic setUp function that
 sets up a stack. Normal test setUp functions call this function to set
 up the stack and then use the register function to register tear-down
-functions. 
+functions.
 
 To see how this works we'll create a faux test:
 
@@ -73,11 +73,12 @@
 
     >>> here == os.getcwd()
     False
+    >>> setupstack_cwd = os.getcwd()
 
 We can create files to out heart's content:
 
     >>> open('Data.fs', 'w').write('xxx')
-    >>> os.path.exists('Data.fs')
+    >>> os.path.exists(os.path.join(setupstack_cwd, 'Data.fs'))
     True
 
 We'll make the file read-only. This can cause problems on Windows, but
@@ -106,5 +107,5 @@
 and the files we created will be gone (along with the temporary
 directory that was created:
 
-    >>> os.path.exists('Data.fs')
+    >>> os.path.exists(os.path.join(setupstack_cwd, 'Data.fs'))
     False



More information about the Zope3-Checkins mailing list