Author: bugman Date: Wed May 7 15:32:26 2008 New Revision: 6122 URL: http://svn.gna.org/viewcvs/relax?rev=6122&view=rev Log: Added 12 arg unit tests for the select user functions. Added: 1.3/test_suite/unit_tests/_prompt/test_select.py - copied, changed from r6120, 1.3/test_suite/unit_tests/_prompt/test_deselect.py Copied: 1.3/test_suite/unit_tests/_prompt/test_select.py (from r6120, 1.3/test_suite/unit_tests/_prompt/test_deselect.py) URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_select.py?p2=1.3/test_suite/unit_tests/_prompt/test_select.py&p1=1.3/test_suite/unit_tests/_prompt/test_deselect.py&r1=6120&r2=6122&rev=6122&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_deselect.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_select.py Wed May 7 15:32:26 2008 @@ -24,7 +24,7 @@ from unittest import TestCase # relax module imports. -from prompt.deselect import Deselect +from prompt.select import Select from relax_errors import RelaxBoolError, RelaxNoneIntError, RelaxNoneStrError, RelaxStrError # Unit test imports. @@ -32,15 +32,15 @@ import fake_relax -class Test_deselect(TestCase): - """Unit tests for the functions of the 'prompt.deselect' module.""" +class Test_select(TestCase): + """Unit tests for the functions of the 'prompt.select' module.""" # Instantiate the user function class. - deselect_fns = Deselect(fake_relax.fake_instance()) + select_fns = Select(fake_relax.fake_instance()) def test_read_argfail_file(self): - """The file arg test of the deselect.read() user function.""" + """The file arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -49,11 +49,11 @@ continue # The argument test. - self.assertRaises(RelaxStrError, self.deselect_fns.read, file=data[1]) + self.assertRaises(RelaxStrError, self.select_fns.read, file=data[1]) def test_read_argfail_dir(self): - """The dir arg test of the deselect.read() user function.""" + """The dir arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -62,11 +62,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneStrError, self.deselect_fns.read, file='unresolved', dir=data[1]) + self.assertRaises(RelaxNoneStrError, self.select_fns.read, file='unresolved', dir=data[1]) def test_read_argfail_mol_name_col(self): - """The mol_name_col arg test of the deselect.read() user function.""" + """The mol_name_col arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -75,11 +75,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.deselect_fns.read, file='unresolved', mol_name_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.select_fns.read, file='unresolved', mol_name_col=data[1]) def test_read_argfail_res_num_col(self): - """The res_num_col arg test of the deselect.read() user function.""" + """The res_num_col arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -88,11 +88,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.deselect_fns.read, file='unresolved', res_num_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.select_fns.read, file='unresolved', res_num_col=data[1]) def test_read_argfail_res_name_col(self): - """The res_name_col arg test of the deselect.read() user function.""" + """The res_name_col arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -101,11 +101,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.deselect_fns.read, file='unresolved', res_name_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.select_fns.read, file='unresolved', res_name_col=data[1]) def test_read_argfail_spin_num_col(self): - """The spin_num_col arg test of the deselect.read() user function.""" + """The spin_num_col arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -114,11 +114,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.deselect_fns.read, file='unresolved', spin_num_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.select_fns.read, file='unresolved', spin_num_col=data[1]) def test_read_argfail_spin_name_col(self): - """The spin_name_col arg test of the deselect.read() user function.""" + """The spin_name_col arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -127,11 +127,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.deselect_fns.read, file='unresolved', spin_name_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.select_fns.read, file='unresolved', spin_name_col=data[1]) def test_read_argfail_sep(self): - """The sep arg test of the deselect.read() user function.""" + """The sep arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -140,11 +140,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneStrError, self.deselect_fns.read, file='unresolved', sep=data[1]) + self.assertRaises(RelaxNoneStrError, self.select_fns.read, file='unresolved', sep=data[1]) def test_read_argfail_change_all(self): - """The change_all arg test of the deselect.read() user function.""" + """The change_all arg test of the select.read() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -153,11 +153,11 @@ continue # The argument test. - self.assertRaises(RelaxBoolError, self.deselect_fns.read, file='unresolved', change_all=data[1]) + self.assertRaises(RelaxBoolError, self.select_fns.read, file='unresolved', change_all=data[1]) def test_reverse_argfail_spin_id(self): - """The spin_id arg test of the deselect.reverse() user function.""" + """The spin_id arg test of the select.reverse() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -166,11 +166,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneStrError, self.deselect_fns.reverse, spin_id=data[1]) + self.assertRaises(RelaxNoneStrError, self.select_fns.reverse, spin_id=data[1]) def test_spin_argfail_spin_id(self): - """The spin_id arg test of the deselect.spin() user function.""" + """The spin_id arg test of the select.spin() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -179,11 +179,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneStrError, self.deselect_fns.spin, spin_id=data[1]) + self.assertRaises(RelaxNoneStrError, self.select_fns.spin, spin_id=data[1]) def test_spin_argfail_change_all(self): - """The change_all arg test of the deselect.spin() user function.""" + """The change_all arg test of the select.spin() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -192,4 +192,4 @@ continue # The argument test. - self.assertRaises(RelaxBoolError, self.deselect_fns.spin, change_all=data[1]) + self.assertRaises(RelaxBoolError, self.select_fns.spin, change_all=data[1])