mailr3872 - /1.3/test_suite/unit_tests/_generic_fns/test_selection.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on November 24, 2007 - 12:00:
Author: bugman
Date: Sat Nov 24 12:00:37 2007
New Revision: 3872

URL: http://svn.gna.org/viewcvs/relax?rev=3872&view=rev
Log:
Added a unit test for the generic_fns.selection.count_spins() function.


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=3872&r1=3871&r2=3872&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 Sat Nov 24 
12:00:37 2007
@@ -74,6 +74,17 @@
         relax_data_store.__reset__()
 
 
+    def test_count_spins(self):
+        """Test that the number of spins can be properly counted.
+
+        The function tested is generic_fns.selection.count_spins().
+        """
+
+        # Test the number of spins counted.
+        self.assertEqual(selection.count_spins(), 7)
+        self.assertEqual(selection.count_spins(selection='@N5'), 2)
+
+
     def test_molecule_loop(self):
         """Test the proper operation of the molecule loop with molecule 
selection.
 




Related Messages


Powered by MHonArc, Updated Sat Nov 24 12:40:09 2007