def test_str2(self):
     from phenum.makeStr import run
     from os import system
     if os.path.isfile("to-relax.cfg"):
         system("rm to-relax.cfg")
     args = {
         "structures": [1, 2],
         "debug": False,
         "examples": False,
         "displace": 0.0,
         "input": "tests/enumeration/sc_1/enum.out_100",
         "mink": True,
         "species": ["Al", "Cu", "Ni"],
         "verbose": None,
         "outfile": "to-relax.cfg",
         "rattle": 0.0,
         "species_mapping": {
             0: 1,
             1: 2
         },
         "config": "t",
         "remove_zeros": True
     }
     run(args)
     self._compare_files("to-relax.cfg",
                         "tests/enumeration/sc_1/to-relax.cfg_2")
     system("rm to-relax.cfg")
 def test_str20(self):
     from phenum.makeStr import run
     from os import system
     args = {
         "structures": ['1', '3'],
         "debug": False,
         "examples": False,
         "displace": 0.0,
         "input": "tests/enumeration/fcc_1/enum.out_2_6",
         "mink": True,
         "species": ['H', 'Pt'],
         "verbose": None,
         "outfile": "vasp.{}",
         "rattle": 0.0,
         "species_mapping": None,
         "config": "f",
         "remove_zeros": True
     }
     run(args)
     system("rm vasp*")
 def test_str17(self):
     from phenum.makeStr import run
     from os import system
     args = {
         "structures": ['bite'],
         "debug": False,
         "examples": False,
         "displace": 0.0,
         "input": "tests/enumeration/fcc_1/enum.out_2_6",
         "mink": True,
         "species": ['H', 'Pt'],
         "verbose": None,
         "outfile": "vasp.{}",
         "rattle": 0.0,
         "species_mapping": None,
         "config": "f",
         "remove_zeros": True
     }
     with pytest.raises(ValueError):
         run(args)
 def test_str23(self):
     from phenum.makeStr import run
     from os import system
     args = {
         "structures": [1],
         "debug": False,
         "examples": False,
         "displace": 0.0,
         "input": "tests/enumeration/sc_1/enum.out_100",
         "mink": True,
         "species": ['H', 'Pt'],
         "verbose": None,
         "outfile": "vasp.{}",
         "rattle": 0.0,
         "species_mapping": None,
         "config": "f",
         "remove_zeros": "t"
     }
     run(args)
     self._compare_files("vasp.{}".format(args["structures"][0]),
                         "tests/enumeration/sc_1/vasp.rm_zeros")
     system("rm vasp*")
 def test_str21(self):
     from phenum.makeStr import run
     from os import system
     args = {
         "structures": ['1', '175'],
         "debug": False,
         "examples": False,
         "displace": 0.0,
         "input": "tests/enumeration/hcp_1/enum.out_1_4",
         "mink": True,
         "species": None,
         "verbose": None,
         "outfile": "vasp.{}",
         "rattle": 0.0,
         "species_mapping": None,
         "config": "f",
         "remove_zeros": "t"
     }
     run(args)
     for i in [1, 45, 90, 175]:
         self._compare_files(
             "vasp.{}".format(i),
             "tests/enumeration/hcp_1/vasp.{}.fin".format(i))
     system("rm vasp*")
 def test_str24(self):
     from phenum.makeStr import run
     from os import system
     args = None
     with pytest.raises(ValueError):
         run(args)