Пример #1
0
 def test_as_dict_and_from_dict(self):
     file_name = os.path.join(test_dir, 'HEADER')
     header = Header.from_file(file_name)
     struct = header.struct
     pot = FeffPot(struct, 'O')
     d=pot.as_dict()
     pot2 = FeffPot.from_dict(d)
     self.assertEqual(str(pot), str(pot2),
                      "FeffPot to and from dict does not match")
Пример #2
0
 def test_as_dict_and_from_dict(self):
     file_name = os.path.join(test_dir, 'HEADER')
     header = Header.from_file(file_name)
     struct = header.struct
     pot = FeffPot(struct, 'O')
     d = pot.as_dict()
     pot2 = FeffPot.from_dict(d)
     self.assertEqual(str(pot), str(pot2),
                      "FeffPot to and from dict does not match")