Ejemplo n.º 1
0
 def test_as_dict_and_from_dict(self):
     file_name = os.path.join(test_dir, 'HEADER')
     header = Header.from_file(file_name)
     d = header.as_dict()
     header2 = Header.from_dict(d)
     self.assertEqual(str(header), str(header2),
                      "Header failed to and from dict test")
Ejemplo n.º 2
0
 def test_to_dict_and_from_dict(self):
     file_name = os.path.join(test_dir, 'HEADER')
     header = Header.from_file(file_name)
     d = header.to_dict
     header2 = Header.from_dict(d)
     self.assertEqual(str(header), str(header2),
                      "Header failed to and from dict test")
Ejemplo n.º 3
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
     atoms = FeffAtoms(struct, 'O')
     d = atoms.as_dict()
     atoms2 = FeffAtoms.from_dict(d)
     self.assertEqual(str(atoms), str(atoms2),
                      "FeffAtoms failed to and from dict test")
Ejemplo n.º 4
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")
Ejemplo n.º 5
0
 def test_to_dict_and_from_dict(self):
     file_name = os.path.join(test_dir, 'HEADER')
     header = Header.from_file(file_name)
     struct = header.struct
     atoms = FeffAtoms(struct, 'O')
     d = atoms.to_dict
     atoms2 = FeffAtoms.from_dict(d)
     self.assertEqual(str(atoms), str(atoms2),
                      "FeffAtoms failed to and from dict test")
Ejemplo n.º 6
0
 def test_to_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.to_dict
     pot2 = FeffPot.from_dict(d)
     self.assertEqual(str(pot), str(pot2),
                      "FeffPot to and from dict does not match")