mailr22233 - /trunk/test_suite/unit_tests/_prompt/test_spectrum.py


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

Header


Content

Posted by edward on February 21, 2014 - 11:21:
Author: bugman
Date: Fri Feb 21 11:21:25 2014
New Revision: 22233

URL: http://svn.gna.org/viewcvs/relax?rev=22233&view=rev
Log:
Fixes for the unit tests of the spectrum.read_intensities user function.

A number of checks were not correctly set up, and the recent changes caused 
others to now fail.


Modified:
    trunk/test_suite/unit_tests/_prompt/test_spectrum.py

Modified: trunk/test_suite/unit_tests/_prompt/test_spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_prompt/test_spectrum.py?rev=22233&r1=22232&r2=22233&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_prompt/test_spectrum.py (original)
+++ trunk/test_suite/unit_tests/_prompt/test_spectrum.py Fri Feb 21 11:21:25 
2014
@@ -24,7 +24,7 @@
 
 # relax module imports.
 from prompt.interpreter import Interpreter
-from lib.errors import RelaxIntError, RelaxNoneIntError, 
RelaxNoneIntListIntError, RelaxNoneStrError, RelaxNumError, RelaxStrError
+from lib.errors import RelaxIntError, RelaxNoneIntError, 
RelaxNoneIntListIntError, RelaxNoneStrError, RelaxNumError, RelaxStrError, 
RelaxStrListStrError
 
 # Unit test imports.
 from test_suite.unit_tests._prompt.data_types import DATA_TYPES
@@ -136,7 +136,7 @@
                 continue
 
             # The argument test.
-            self.assertRaises(RelaxStrError, 
self.spectrum_fns.read_intensities, file=data[1])
+            self.assertRaises(RelaxStrListStrError, 
self.spectrum_fns.read_intensities, file=data[1])
 
 
     def test_read_intensities_argfail_dir(self):
@@ -162,7 +162,7 @@
                 continue
 
             # The argument test.
-            self.assertRaises(RelaxStrError, 
self.spectrum_fns.read_intensities, spectrum_id=data[1])
+            self.assertRaises(RelaxStrListStrError, 
self.spectrum_fns.read_intensities, spectrum_id=data[1])
 
 
     def test_read_intensities_argfail_dim(self):
@@ -171,11 +171,11 @@
         # Loop over the data types.
         for data in DATA_TYPES:
             # Catch the int argument, and skip it.
-            if data[0] == 'int':
-                continue
-
-            # The argument test.
-            self.assertRaises(RelaxStrError, 
self.spectrum_fns.read_intensities, dim=data[1])
+            if data[0] == 'int' or data[0] == 'bin':
+                continue
+
+            # The argument test.
+            self.assertRaises(RelaxIntError, 
self.spectrum_fns.read_intensities, file='a', spectrum_id='x', dim=data[1])
 
 
     def test_read_intensities_argfail_int_col(self):
@@ -201,7 +201,7 @@
                 continue
 
             # The argument test.
-            self.assertRaises(RelaxStrError, 
self.spectrum_fns.read_intensities, int_method=data[1])
+            self.assertRaises(RelaxStrError, 
self.spectrum_fns.read_intensities, file='a', spectrum_id='x', 
int_method=data[1])
 
 
     def test_read_intensities_argfail_mol_name_col(self):




Related Messages


Powered by MHonArc, Updated Fri Feb 21 12:00:06 2014