Package test_suite :: Package unit_tests :: Package _lib :: Module test_selection :: Class Test_selection
[hide private]
[frames] | no frames]

Class Test_selection

source code


Unit tests for the functions of the 'lib.selection' module.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
test_Selection_boolean_and(self)
Test the Selection object for boolean '&' mol-res-spin selections.
source code
 
test_Selection_boolean_or(self)
Test the Selection object for boolean '|' mol-res-spin selections.
source code
 
test_Selection_complex_boolean(self)
Test the Selection object for complex boolean mol-res-spin selections.
source code
 
test_Selection_contains_mol1(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the molecule 'RNA'.
source code
 
test_Selection_contains_mol2(self)
The Selection object "#Ap4Aase:Glu & #RNA@C8" does not contain the molecule 'RNA'.
source code
 
test_Selection_contains_mol3(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" does not contain the molecule 'XXX'.
source code
 
test_Selection_contains_mol4(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" does not contain the molecule None.
source code
 
test_Selection_contains_mol5(self)
The Selection object ":Glu" does contain the molecule None.
source code
 
test_Selection_contains_mol_re1(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the molecule 'R*'.
source code
 
test_Selection_contains_mol_re2(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the molecule '*R*'.
source code
 
test_Selection_contains_res1(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" does not contain the res 'Glu' (without the mol name).
source code
 
test_Selection_contains_res2(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the res 'Glu' of the mol 'Ap4Aase'.
source code
 
test_Selection_contains_res3(self)
The Selection object "#Ap4Aase:Glu & #RNA@C8" does not contain the res 'Glu'.
source code
 
test_Selection_contains_res4(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" does not contain the res 'Ala'.
source code
 
test_Selection_contains_res5(self)
The Selection object "#Ap4Aase:Glu | #RNA:14@C8" does not contain the res None.
source code
 
test_Selection_contains_res6(self)
The Selection object "#Ap4Aase" does contains the res None.
source code
 
test_Selection_contains_res7(self)
The Selection object "#Ap4Aase" does not contain the res None of the mol 'RNA'.
source code
 
test_Selection_contains_res_re1(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the res 'G*' of the mol 'Ap4Aase'.
source code
 
test_Selection_contains_res_re2(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the res '*G*' of the mol 'Ap4Aase'.
source code
 
test_Selection_contains_spin1(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" does not contain the spin 'C8' (without the mol name).
source code
 
test_Selection_contains_spin2(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the spin 'C8' of the mol 'RNA'.
source code
 
test_Selection_contains_spin3(self)
The Selection object "#Ap4Aase:Glu & #RNA@C8" does not contain the spin 'C8'.
source code
 
test_Selection_contains_spin4(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" does not contain the spin 'N3'.
source code
 
test_Selection_contains_spin5(self)
The Selection object "#Ap4Aase:Glu | #RNA:14@C8" does not contain the spin None.
source code
 
test_Selection_contains_spin6(self)
The Selection object "#Ap4Aase" does contains the spin None.
source code
 
test_Selection_contains_spin7(self)
The Selection object "#Ap4Aase" does not contain the spin None of the mol 'RNA'.
source code
 
test_Selection_contains_spin_re1(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the spin 'C*' of the mol 'RNA'.
source code
 
test_Selection_contains_spin_re2(self)
The Selection object "#Ap4Aase:Glu | #RNA@C8" contains the spin '*C*' of the mol 'RNA'.
source code
 
test_Selection_memory(self)
Test that the Selection object has no memory of previous selections.
source code
 
test_Selection_range_contains_resid(self)
The Selection object ":1-70" contains the res ':1'.
source code
 
test_Selection_range_contains_resid2(self)
The Selection object ":1-70" does not contain the res ':71'.
source code
 
test_Selection_range_contains_spinid(self)
The Selection object ":1-70" contains the spin ':1@N'.
source code
 
test_Selection_range_contains_spinid2(self)
The Selection object ":1-70" does not contain the spin ':71@C'.
source code
 
test_parse_token_single_element_num(self)
Test the lib.selection.parse_token() function on the string '1'.
source code
 
test_parse_token_single_element_neg_num(self)
Test the lib.selection.parse_token() function on the string '-4'.
source code
 
test_parse_token_single_element_name(self)
Test the lib.selection.parse_token() function on the string 'G'.
source code
 
test_parse_token_single_element_wildcard_name(self)
Test the lib.selection.parse_token() function on the string 'N*'.
source code
 
test_parse_token_single_element_range(self)
Test the lib.selection.parse_token() function on the string '1-10'.
source code
 
test_parse_token_single_element_neg_range(self)
Test the lib.selection.parse_token() function on the string '-10--1'.
source code
 
test_parse_token_multi_element_num(self)
Test the lib.selection.parse_token() function on the string '-2, 1'.
source code
 
test_parse_token_multi_element_name(self)
Test the lib.selection.parse_token() function on the string 'N,CA'.
source code
 
test_parse_token_multi_element_num_name(self)
Test the lib.selection.parse_token() function on the string '76,Ala'.
source code
 
test_parse_token_multi_element_num_range(self)
Test the lib.selection.parse_token() function on the string '1,3-5'.
source code
 
test_parse_token_multi_element_range_name(self)
Test the lib.selection.parse_token() function on the string '3-5,NH'.
source code
 
test_parse_token_multi_element_range_num_name(self)
Test the lib.selection.parse_token() function on the string '3-6, 8, Gly'.
source code
 
test_tokenise1(self)
Test the lib.selection.tokenise() function on the string '@1'.
source code
 
test_tokenise2(self)
Test the lib.selection.tokenise() function on the string ':-4'.
source code
 
test_tokenise3(self)
Test the lib.selection.tokenise() function on the string '#CaM'.
source code
 
test_tokenise4(self)
Test the lib.selection.tokenise() function on the string ':G@N3'.
source code
 
test_tokenise5(self)
Test the lib.selection.tokenise() function on the string '#OMP@NH'.
source code
 
test_tokenise6(self)
Test the lib.selection.tokenise() function on the string '#Lyso:20-50'.
source code
 
test_tokenise7(self)
Test the lib.selection.tokenise() function on the string '#Ap4Aase:*@N,CA'.
source code
 
test_tokenise8(self)
Test the lib.selection.tokenise() function on the string '@N*'.
source code
 
test_tokenise_dup_atom_id_fail1(self)
Test failure of the lib.selection.tokenise() function on the string '@N@1'.
source code
 
test_tokenise_dup_atom_id_fail2(self)
Test failure of the lib.selection.tokenise() function on the string ':*@N@1'.
source code
 
test_tokenise_dup_atom_id_fail3(self)
Test failure of the lib.selection.tokenise() function on the string '@N:*@1'.
source code
 
test_tokenise_dup_res_id_fail1(self)
Test failure of the lib.selection.tokenise() function on the string ':1:2'.
source code
 
test_tokenise_dup_res_id_fail2(self)
Test failure of the lib.selection.tokenise() function on the string '#None:1:Ala'.
source code
 
test_tokenise_dup_res_id_fail3(self)
Test failure of the lib.selection.tokenise() function on the string ':1:Ala@N'.
source code
 
test_tokenise_dup_mol_id_fail1(self)
Test failure of the lib.selection.tokenise() function on the string '#A#B'.
source code
 
test_tokenise_dup_mol_id_fail2(self)
Test failure of the lib.selection.tokenise() function on the string '#A#B:Leu'.
source code
 
test_tokenise_dup_mol_id_fail3(self)
Test failure of the lib.selection.tokenise() function on the string '#A#C@CA'.
source code
 
test_tokenise_out_of_order_atom_id_fail1(self)
Test failure of the lib.selection.tokenise() function on the string '@CA#A'.
source code
 
test_tokenise_out_of_order_atom_id_fail2(self)
Test failure of the lib.selection.tokenise() function on the string '@CA:Pro'.
source code
 
test_tokenise_out_of_order_atom_id_fail3(self)
Test failure of the lib.selection.tokenise() function on the string '@CA#Z:Pro'.
source code
 
test_tokenise_out_of_order_res_id_fail1(self)
Test failure of the lib.selection.tokenise() function on the string '@CA:Pro'.
source code
 
test_tokenise_out_of_order_res_id_fail2(self)
Test failure of the lib.selection.tokenise() function on the string ':Glu#X'.
source code
 
test_tokenise_out_of_order_res_id_fail3(self)
Test failure of the lib.selection.tokenise() function on the string '#1@12423:Glu'.
source code
 
test_tokenise_out_of_order_mol_id_fail1(self)
Test failure of the lib.selection.tokenise() function on the string ':1-160#A'.
source code
 
test_tokenise_out_of_order_mol_id_fail2(self)
Test failure of the lib.selection.tokenise() function on the string '@N,CA#A'.
source code
 
test_tokenise_out_of_order_mol_id_fail3(self)
Test failure of the lib.selection.tokenise() function on the string '@N:-10#Zip'.
source code
 
test_tokenise_bad_string_fail1(self)
Test failure of the lib.selection.tokenise() function on the string '13'.
source code
 
test_tokenise_bad_string_fail2(self)
Test failure of the lib.selection.tokenise() function on the string 'XXX'.
source code
 
test_tokenise_bad_string_fail3(self)
Test failure of the lib.selection.tokenise() function on the string ''.
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, setUp, 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, _diffThreshold

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

test_tokenise_dup_atom_id_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@N@1'.

This tests for a duplicated atom identifier.

test_tokenise_dup_atom_id_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string ':*@N@1'.

This tests for a duplicated atom identifier.

test_tokenise_dup_atom_id_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@N:*@1'.

This tests for a duplicated atom identifier.

test_tokenise_dup_res_id_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string ':1:2'.

This tests for a duplicated residue identifier.

test_tokenise_dup_res_id_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '#None:1:Ala'.

This tests for a duplicated residue identifier.

test_tokenise_dup_res_id_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string ':1:Ala@N'.

This tests for a duplicated residue identifier.

test_tokenise_dup_mol_id_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '#A#B'.

This tests for a duplicated molecule identifier.

test_tokenise_dup_mol_id_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '#A#B:Leu'.

This tests for a duplicated molecule identifier.

test_tokenise_dup_mol_id_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '#A#C@CA'.

This tests for a duplicated molecule identifier.

test_tokenise_out_of_order_atom_id_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@CA#A'.

This tests for an out of order '@' identifier.

test_tokenise_out_of_order_atom_id_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@CA:Pro'.

This tests for an out of order '@' identifier.

test_tokenise_out_of_order_atom_id_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@CA#Z:Pro'.

This tests for an out of order '@' identifier.

test_tokenise_out_of_order_res_id_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@CA:Pro'.

This tests for an out of order ':' identifier.

test_tokenise_out_of_order_res_id_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string ':Glu#X'.

This tests for an out of order ':' identifier.

test_tokenise_out_of_order_res_id_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '#1@12423:Glu'.

This tests for an out of order ':' identifier.

test_tokenise_out_of_order_mol_id_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string ':1-160#A'.

This tests for an out of order '#' identifier.

test_tokenise_out_of_order_mol_id_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@N,CA#A'.

This tests for an out of order '#' identifier.

test_tokenise_out_of_order_mol_id_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '@N:-10#Zip'.

This tests for an out of order '#' identifier.

test_tokenise_bad_string_fail1(self)

source code 

Test failure of the lib.selection.tokenise() function on the string '13'.

This tests for an improper selection string.

test_tokenise_bad_string_fail2(self)

source code 

Test failure of the lib.selection.tokenise() function on the string 'XXX'.

This tests for an improper selection string.

test_tokenise_bad_string_fail3(self)

source code 

Test failure of the lib.selection.tokenise() function on the string ''.

This tests for an improper selection string.