mailr14713 - /1.3/test_suite/unit_tests/_prompt/data_types.py


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

Header


Content

Posted by edward on September 20, 2011 - 12:17:
Author: bugman
Date: Tue Sep 20 12:17:49 2011
New Revision: 14713

URL: http://svn.gna.org/viewcvs/relax?rev=14713&view=rev
Log:
Replaced the tempfile.mkstemp with relax_io.DummyFileObject in the prompt 
unit tests.

The tempfile.mkstemp() only creates a string, whereas a file object is 
required.


Modified:
    1.3/test_suite/unit_tests/_prompt/data_types.py

Modified: 1.3/test_suite/unit_tests/_prompt/data_types.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/data_types.py?rev=14713&r1=14712&r2=14713&view=diff
==============================================================================
--- 1.3/test_suite/unit_tests/_prompt/data_types.py (original)
+++ 1.3/test_suite/unit_tests/_prompt/data_types.py Tue Sep 20 12:17:49 2011
@@ -22,8 +22,9 @@
 
 # Python module imports.
 from numpy import int8, int16, int32, int64, float32, float64, zeros
-from tempfile import mkstemp
 
+# relax module imports.
+from relax_io import DummyFileObject
 
 class Container:
     """A class to act as a container."""
@@ -77,7 +78,7 @@
 DATA_TYPES.append(['int', zeros(2, int64)[0]])
 
 # File descriptor.
-DATA_TYPES.append(['file', mkstemp()])
+DATA_TYPES.append(['file', DummyFileObject()])
 
 # Floats.
 DATA_TYPES.append(['float', 0.0])




Related Messages


Powered by MHonArc, Updated Tue Sep 20 13:20:01 2011