Author: bugman Date: Tue Jan 15 10:35:39 2008 New Revision: 4707 URL: http://svn.gna.org/viewcvs/relax?rev=4707&view=rev Log: Wrote the N arg unit test for the n_state_model.model() user function. Modified: branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py Modified: branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py?rev=4707&r1=4706&r2=4707&view=diff ============================================================================== --- branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py (original) +++ branches/N_state_model/test_suite/unit_tests/_prompt/test_n_state_model.py Tue Jan 15 10:35:39 2008 @@ -25,7 +25,7 @@ # relax module imports. from prompt.n_state_model import N_state_model -from relax_errors import RelaxBoolError, RelaxStrError +from relax_errors import RelaxBoolError, RelaxIntError, RelaxStrError from test_suite.unit_tests.n_state_model_testing_base import N_state_model_base_class # Unit test imports. @@ -38,6 +38,19 @@ # Instantiate the user function class. n_state_model_fns = N_state_model(fake_relax.fake_instance()) + + + def test_model_argfail_N(self): + """Failure of the N arg of the n_state_model.model() user function.""" + + # Loop over the data types. + for data in DATA_TYPES: + # Catch the bin and int arguments, and skip them. + if data[0] == 'bin' or data[0] == 'int': + continue + + # The argument test. + self.assertRaises(RelaxIntError, self.n_state_model_fns.model, N=data[1]) def test_set_domain_argfail_tensor(self):