Beispiel #1
0
 def test_selections(self):
     '''
     Check that isotopes can be selected in any manner.
     '''
     self.assertIsInstance(Isotope.get_by_strid('1H'), Isotope)
     self.assertIsInstance(Isotope[175], Isotope)
     self.assertIsInstance(Isotope[0], Isotope)
     self.assertIsInstance(Isotope.get_by_symbol('H'), list)
Beispiel #2
0
 def test_data(self):
     '''
     Test the integrity of the database data.
     '''
     self.assertTrue(Isotope.get_by_strid('1H').Z == 1)
Beispiel #3
0
 def test_table(self):
     '''
     Check that the table can be converted to a :class:`~pandas.DataFrame`.
     '''
     self.assertIsInstance(Isotope.to_frame(), pd.DataFrame)