Package test_suite :: Package unit_tests :: Module spin_testing_base :: Class Spin_base_class
[hide private]
[frames] | no frames]

Class Spin_base_class

source code


Testing base class for 'prompt.spin' and corresponding 'generic_fns.mol_res_spin' fns.

This base class also contains many shared unit tests.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Set up for all the spin unit tests.
source code
 
test_copy_spin(self)
Test the copying of the spin data within the same residue.
source code
 
test_copy_spin_between_molecules(self)
Test the copying of the spin data between different molecules.
source code
 
test_copy_spin_between_pipes(self)
Test the copying of the spin data between different data pipes.
source code
 
test_copy_spin_between_pipes_fail(self)
Test the copying of the spin data between different data pipes.
source code
 
test_copy_spin_between_residues(self)
Test the copying of the spin data between different residues.
source code
 
test_copy_spin_fail1(self)
Test the failure of the copying of the spin data of a non-existent residue.
source code
 
test_copy_spin_fail2(self)
Test the failure of the copying of the spin data of a non-existent spin.
source code
 
test_copy_spin_fail3(self)
Test the failure of the copying of the spin data to a non-existent residue.
source code
 
test_copy_spin_fail4(self)
Test the failure of the copying of the spin data to a number which already exists.
source code
 
test_create_pseudo_spin(self)
Test the creation of a pseudo-atom.
source code
 
test_create_pseudo_spin2(self)
Test the creation of a pseudo-atom (test 2).
source code
 
test_create_spin(self)
Test the creation of a spin.
source code
 
test_create_spin_fail(self)
Test the failure of spin creation (by supplying two spins with the same number).
source code
 
test_delete_spin_all(self)
Test the deletion of all spins in one residue.
source code
 
test_delete_spin_name(self)
Test spin deletion using spin name identifiers.
source code
 
test_delete_spin_num(self)
Test spin deletion using spin number identifiers.
source code
 
test_delete_spin_shift(self)
Test the deletion of multiple spins.
source code
 
test_display_spin(self)
Test the display of spin information.
source code
 
test_name_spin(self)
Test the renaming of a spin.
source code
 
test_name_spin_many(self)
Test the renaming of multiple spins.
source code
 
test_number_spin(self)
Test the numbering of a spin.
source code
 
test_number_spin_many_fail(self)
Test the renaming of multiple spins.
source code

Inherited from base_classes.UnitTestCase: tearDown

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Set up for all the spin unit tests.

The data contained within the 'orig' data pipe is:

ID Molecule Res number Res name Spin number Spin name 0,0,0 Old mol 1 Ala 111 C8 0,0,1 Old mol 1 Ala 6 C19 0,0,2 Old mol 1 Ala 7 C21 0,0,3 Old mol 1 Ala 8 C24 0,0,4 Old mol 1 Ala 9 C26 0,1,0 Old mol 2 Arg 78 NH 1,0,0 New mol 5 Lys 239 NH 1,1,0 New mol 6 Thr None None 1,1,1 New mol 6 Thr 3239 NH

The IDs correspond to the molecule, residue and spin indices.

Overrides: unittest.case.TestCase.setUp

test_copy_spin(self)

source code 

Test the copying of the spin data within the same residue.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_between_molecules(self)

source code 

Test the copying of the spin data between different molecules.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_between_pipes(self)

source code 

Test the copying of the spin data between different data pipes.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_between_pipes_fail(self)

source code 

Test the copying of the spin data between different data pipes.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_between_residues(self)

source code 

Test the copying of the spin data between different residues.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_fail1(self)

source code 

Test the failure of the copying of the spin data of a non-existent residue.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_fail2(self)

source code 

Test the failure of the copying of the spin data of a non-existent spin.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_fail3(self)

source code 

Test the failure of the copying of the spin data to a non-existent residue.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_copy_spin_fail4(self)

source code 

Test the failure of the copying of the spin data to a number which already exists.

The function tested is both generic_fns.mol_res_spin.copy_spin() and prompt.spin.copy().

test_create_pseudo_spin(self)

source code 

Test the creation of a pseudo-atom.

The function tested is both generic_fns.mol_res_spin.create_pseudo_spin() and prompt.spin.create_pseudo().

test_create_pseudo_spin2(self)

source code 

Test the creation of a pseudo-atom (test 2).

The function tested is both generic_fns.mol_res_spin.create_pseudo_spin() and prompt.spin.create_pseudo().

test_create_spin(self)

source code 

Test the creation of a spin.

The function tested is both generic_fns.mol_res_spin.create_spin() and prompt.spin.create().

test_create_spin_fail(self)

source code 

Test the failure of spin creation (by supplying two spins with the same number).

The function tested is both generic_fns.mol_res_spin.create_spin() and prompt.spin.create().

test_delete_spin_all(self)

source code 

Test the deletion of all spins in one residue.

The function tested is both generic_fns.mol_res_spin.delete_spin() and prompt.spin.delete().

test_delete_spin_name(self)

source code 

Test spin deletion using spin name identifiers.

The function tested is both generic_fns.mol_res_spin.delete_spin() and prompt.spin.delete().

test_delete_spin_num(self)

source code 

Test spin deletion using spin number identifiers.

The function tested is both generic_fns.mol_res_spin.delete_spin() and prompt.spin.delete().

test_delete_spin_shift(self)

source code 

Test the deletion of multiple spins.

The function tested is both generic_fns.mol_res_spin.delete_spin() and prompt.spin.delete().

test_display_spin(self)

source code 

Test the display of spin information.

The function tested is both generic_fns.mol_res_spin.display_spin() and prompt.spin.display().

test_name_spin(self)

source code 

Test the renaming of a spin.

The function tested is both generic_fns.mol_res_spin.name_spin() and prompt.spin.name().

test_name_spin_many(self)

source code 

Test the renaming of multiple spins.

The function tested is both generic_fns.mol_res_spin.name_spin() and prompt.spin.name().

test_number_spin(self)

source code 

Test the numbering of a spin.

The function tested is both generic_fns.mol_res_spin.number_spin() and prompt.spin.number().

test_number_spin_many_fail(self)

source code 

Test the renaming of multiple spins.

The function tested is both generic_fns.mol_res_spin.number_spin() and prompt.spin.number().