mailr20211 - /trunk/test_suite/system_tests/base_classes.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 19, 2013 - 11:39:
Author: bugman
Date: Wed Jun 19 11:39:06 2013
New Revision: 20211

URL: http://svn.gna.org/viewcvs/relax?rev=20211&view=rev
Log:
More MS Windows fixes, this time a nasty kludge, for the relax system tests.

This is strangely needed for the relax_disp branch and not the trunk for a 
64-bit MS Windows 7 test
system.  The reason why this WindowsError is triggered by the base tearDown() 
method in the
relax_disp branch and not trunk is a total mystery.  Actually why Windows 
refuses to complete the
file close() operations of the results.write and state.save user functions 
before calling the
tearDown() method is the greater mystery.


Modified:
    trunk/test_suite/system_tests/base_classes.py

Modified: trunk/test_suite/system_tests/base_classes.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/base_classes.py?rev=20211&r1=20210&r2=20211&view=diff
==============================================================================
--- trunk/test_suite/system_tests/base_classes.py (original)
+++ trunk/test_suite/system_tests/base_classes.py Wed Jun 19 11:39:06 2013
@@ -67,6 +67,9 @@
     def tearDown(self):
         """Default tearDown operation - delete temp directories and files 
and reset relax."""
 
+        # Horrible MS Windows kludge - avoid the WindowsError due to the 
file still being open by the state.save or results.write user functions.
+        sleep(0.03)
+
         # Remove the temporary directories.
         if hasattr(ds, 'tmpdir'):
             # Delete the directory.
@@ -85,9 +88,6 @@
 
         # Remove temporary files.
         if hasattr(ds, 'tmpfile'):
-            # MS Windows kludge - avoid the WindowsError due to the file 
still being open by the state.save or results.write user functions.
-            sleep(0.01)
-
             # Delete the file.
             delete(ds.tmpfile, fail=False)
 
@@ -96,9 +96,6 @@
 
         # Remove temporary files.
         if hasattr(self, 'tmpfile'):
-            # MS Windows kludge - avoid the WindowsError due to the file 
still being open by the state.save or results.write user functions.
-            sleep(0.01)
-
             # Delete the file.
             delete(self.tmpfile, fail=False)
 




Related Messages


Powered by MHonArc, Updated Wed Jun 19 12:00:02 2013