コード例 #1
0
ファイル: test_isotope.py プロジェクト: gitter-badger/exa
 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)
コード例 #2
0
ファイル: test_isotope.py プロジェクト: gitter-badger/exa
 def test_data(self):
     '''
     Test the integrity of the database data.
     '''
     self.assertTrue(Isotope.get_by_strid('1H').Z == 1)
コード例 #3
0
ファイル: test_isotope.py プロジェクト: gitter-badger/exa
 def test_table(self):
     '''
     Check that the table can be converted to a :class:`~pandas.DataFrame`.
     '''
     self.assertIsInstance(Isotope.to_frame(), pd.DataFrame)