Author: bugman Date: Mon Apr 14 17:43:17 2008 New Revision: 5699 URL: http://svn.gna.org/viewcvs/relax?rev=5699&view=rev Log: Wrote a unit test for the Selection object for complex boolean mol-res-spin selections. Modified: 1.3/test_suite/unit_tests/_generic_fns/test_selection.py Modified: 1.3/test_suite/unit_tests/_generic_fns/test_selection.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_generic_fns/test_selection.py?rev=5699&r1=5698&r2=5699&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_generic_fns/test_selection.py (original) +++ 1.3/test_suite/unit_tests/_generic_fns/test_selection.py Mon Apr 14 17:43:17 2008 @@ -82,6 +82,17 @@ relax_data_store.__reset__() + def test_Selection_complex_boolean(self): + """Test the Selection object for complex boolean mol-res-spin selections.""" + + # The Selection object: + obj = selection.Selection("#Ap4Aase:4 & :Pro | #RNA") + + # Tests + self.assertEqual(obj._intersect, None) + self.assertNotEqual(obj._union, None) + + def test_count_spins(self): """Test that the number of spins can be properly counted. @@ -1331,4 +1342,3 @@ self.assertEqual(len(sel), 2) for res in sel: self.assert_(res.num in [-4,4]) -