mailr26323 - /trunk/test_suite/unit_tests/_lib/test_periodic_table.py


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

Header


Content

Posted by edward on October 21, 2014 - 13:57:
Author: bugman
Date: Tue Oct 21 13:57:05 2014
New Revision: 26323

URL: http://svn.gna.org/viewcvs/relax?rev=26323&view=rev
Log:
Added 4 unit tests to the _lib.test_periodic_table module for the 
Periodic_table.has_element() method.


Modified:
    trunk/test_suite/unit_tests/_lib/test_periodic_table.py

Modified: trunk/test_suite/unit_tests/_lib/test_periodic_table.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/test_periodic_table.py?rev=26323&r1=26322&r2=26323&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_lib/test_periodic_table.py     (original)
+++ trunk/test_suite/unit_tests/_lib/test_periodic_table.py     Tue Oct 21 
13:57:05 2014
@@ -56,3 +56,31 @@
         # Check the helium weight.
         weight = periodic_table.atomic_weight(symbol='He')
         self.assertEqual(weight, 4.002602)
+
+
+    def test_has_element_C(self):
+        """Test of the Periodic_table.has_element() method with the symbol 
'C'."""
+
+        # Check.
+        self.assertTrue(periodic_table.has_element('C'))
+
+
+    def test_has_element_NI(self):
+        """Test of the Periodic_table.has_element() method with the symbol 
'NI'."""
+
+        # Check.
+        self.assertTrue(periodic_table.has_element('NI'))
+
+
+    def test_has_element_Ni(self):
+        """Test of the Periodic_table.has_element() method with the symbol 
'Ni'."""
+
+        # Check.
+        self.assertTrue(periodic_table.has_element('Ni'))
+
+
+    def test_has_element_XYZ(self):
+        """Test of the Periodic_table.has_element() method with the symbol 
'XYZ'."""
+
+        # Check.
+        self.assertTrue(not periodic_table.has_element('XYZ'))




Related Messages


Powered by MHonArc, Updated Tue Oct 21 14:20:03 2014