Author: bugman
Date: Thu Aug 28 15:24:39 2014
New Revision: 25381

URL: http://svn.gna.org/viewcvs/relax?rev=25381&view=rev
Log:
Created a unit test for the Periodic_table.atomic_mass() method.

This method is not implemented yet.


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=25381&r1=25380&r2=25381&view=diff
==============================================================================
--- trunk/test_suite/unit_tests/_lib/test_periodic_table.py     (original)
+++ trunk/test_suite/unit_tests/_lib/test_periodic_table.py     Thu Aug 28 
15:24:39 2014
@@ -30,6 +30,22 @@
     """Unit tests for the lib.periodic_table module."""
 
 
+    def test_get_atomic_mass(self):
+        """Test of the periodic_table.atomic_mass() method."""
+
+        # Check the proton weight.
+        weight = periodic_table.atomic_mass(symbol='H')
+        self.assertEqual(weight, 1.007975)
+
+        # Check the 1H weight.
+        weight = periodic_table.atomic_weight(symbol='1H')
+        self.assertEqual(weight, 1.0078250322)
+
+        # Check the 2H weight.
+        weight = periodic_table.atomic_weight(symbol='2H')
+        self.assertEqual(weight, 2.0141017781)
+
+
     def test_get_atomic_weight(self):
         """Test of the periodic_table.atomic_weight() method."""
 


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to