mailr13713 - in /branches/gui_testing/test_suite: gui_tests/base_classes.py system_tests/base_classes.py unit_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 July 19, 2011 - 12:07:
Author: bugman
Date: Tue Jul 19 12:07:56 2011
New Revision: 13713

URL: http://svn.gna.org/viewcvs/relax?rev=13713&view=rev
Log:
The test suite base class tearDown() methods now delete tmpdir and tmpfile 
from self.

This allows the names to be sorted somewhere where a call to 
generic_fns.reset.reset() will delete
them.


Modified:
    branches/gui_testing/test_suite/gui_tests/base_classes.py
    branches/gui_testing/test_suite/system_tests/base_classes.py
    branches/gui_testing/test_suite/unit_tests/base_classes.py

Modified: branches/gui_testing/test_suite/gui_tests/base_classes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/test_suite/gui_tests/base_classes.py?rev=13713&r1=13712&r2=13713&view=diff
==============================================================================
--- branches/gui_testing/test_suite/gui_tests/base_classes.py (original)
+++ branches/gui_testing/test_suite/gui_tests/base_classes.py Tue Jul 19 
12:07:56 2011
@@ -88,11 +88,39 @@
 
 
     def tearDown(self):
-        """Reset the relax data storage object."""
+        """Default tearDown operation - delete temp directories and files 
and reset relax."""
 
-        # Remove the temporary directory.
+        # Remove the temporary directories.
         if hasattr(ds, 'tmpdir'):
+            # Delete the directory.
             rmtree(ds.tmpdir)
+
+            # Remove the variable.
+            del ds.tmpdir
+
+        # Remove the temporary directories.
+        if hasattr(self, 'tmpdir'):
+            # Delete the directory.
+            rmtree(self.tmpdir)
+
+            # Remove the variable.
+            del self.tmpdir
+
+        # Remove temporary files.
+        if hasattr(ds, 'tmpfile'):
+            # Delete the file.
+            delete(ds.tmpfile, fail=False)
+
+            # Remove the variable.
+            del ds.tmpfile
+
+        # Remove temporary files.
+        if hasattr(self, 'tmpfile'):
+            # Delete the file.
+            delete(self.tmpfile, fail=False)
+
+            # Remove the variable.
+            del self.tmpfile
 
         # Reset relax.
         reset()

Modified: branches/gui_testing/test_suite/system_tests/base_classes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/test_suite/system_tests/base_classes.py?rev=13713&r1=13712&r2=13713&view=diff
==============================================================================
--- branches/gui_testing/test_suite/system_tests/base_classes.py (original)
+++ branches/gui_testing/test_suite/system_tests/base_classes.py Tue Jul 19 
12:07:56 2011
@@ -58,6 +58,14 @@
             # Remove the variable.
             del ds.tmpdir
 
+        # Remove the temporary directories.
+        if hasattr(self, 'tmpdir'):
+            # Delete the directory.
+            rmtree(self.tmpdir)
+
+            # Remove the variable.
+            del self.tmpdir
+
         # Remove temporary files.
         if hasattr(ds, 'tmpfile'):
             # Delete the file.
@@ -66,5 +74,13 @@
             # Remove the variable.
             del ds.tmpfile
 
+        # Remove temporary files.
+        if hasattr(self, 'tmpfile'):
+            # Delete the file.
+            delete(self.tmpfile, fail=False)
+
+            # Remove the variable.
+            del self.tmpfile
+
         # Reset relax.
         reset()

Modified: branches/gui_testing/test_suite/unit_tests/base_classes.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/test_suite/unit_tests/base_classes.py?rev=13713&r1=13712&r2=13713&view=diff
==============================================================================
--- branches/gui_testing/test_suite/unit_tests/base_classes.py (original)
+++ branches/gui_testing/test_suite/unit_tests/base_classes.py Tue Jul 19 
12:07:56 2011
@@ -47,6 +47,14 @@
             # Remove the variable.
             del ds.tmpdir
 
+        # Remove the temporary directories.
+        if hasattr(self, 'tmpdir'):
+            # Delete the directory.
+            rmtree(self.tmpdir)
+
+            # Remove the variable.
+            del self.tmpdir
+
         # Remove temporary files.
         if hasattr(ds, 'tmpfile'):
             # Delete the file.
@@ -55,5 +63,13 @@
             # Remove the variable.
             del ds.tmpfile
 
+        # Remove temporary files.
+        if hasattr(self, 'tmpfile'):
+            # Delete the file.
+            delete(self.tmpfile, fail=False)
+
+            # Remove the variable.
+            del self.tmpfile
+
         # Reset relax.
         reset()




Related Messages


Powered by MHonArc, Updated Tue Jul 19 12:20:02 2011