[Checkins] SVN: z3c.recipe.filetemplate/branches/gary-support-system-python/z3c/recipe/filetemplate/tests.py another tweak to the test fixture
Gary Poster
gary.poster at canonical.com
Tue Jul 14 10:19:14 EDT 2009
Log message for revision 101903:
another tweak to the test fixture
Changed:
U z3c.recipe.filetemplate/branches/gary-support-system-python/z3c/recipe/filetemplate/tests.py
-=-
Modified: z3c.recipe.filetemplate/branches/gary-support-system-python/z3c/recipe/filetemplate/tests.py
===================================================================
--- z3c.recipe.filetemplate/branches/gary-support-system-python/z3c/recipe/filetemplate/tests.py 2009-07-14 14:15:47 UTC (rev 101902)
+++ z3c.recipe.filetemplate/branches/gary-support-system-python/z3c/recipe/filetemplate/tests.py 2009-07-14 14:19:14 UTC (rev 101903)
@@ -26,13 +26,15 @@
trying to write until mtime has actually changed."""
path = os.path.join(dir, *(args[:-1]))
original = os.stat(path).st_mtime
- while os.stat(path).st_mtime == original:
- time.sleep(0.2)
+ while True:
f = open(path, 'w')
f.write(args[-1])
f.flush()
os.fsync(f.fileno())
f.close()
+ if os.stat(path).st_mtime != original:
+ break
+ time.sleep(0.2)
def setUp(test):
zc.buildout.tests.easy_install_SetUp(test)
More information about the Checkins
mailing list