Skip to content

Commit

Permalink
Black format on test_muairss.py #48
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-austin committed Apr 17, 2023
1 parent 3e3b613 commit e3163b0
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions pymuonsuite/test/test_muairss.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,10 @@ def check_write_castep(
):
for (rootDir, subDirs, files) in os.walk(out_dir):
for s in subDirs:
expected_file = os.path.join(
out_dir, s, s + ".cell"
)
expected_file = os.path.join(out_dir, s, s + ".cell")
script_file = input_params["script_file"]
if script_file is not None:
expected_script = os.path.join(
out_dir, s, "script.sh"
)
expected_script = os.path.join(out_dir, s, "script.sh")
self.assertTrue(os.path.exists(expected_script))

self.assertTrue(os.path.exists(expected_file))
Expand All @@ -86,9 +82,7 @@ def check_write_castep(
atoms.calc.cell.kpoint_mp_grid.value,
list_to_string(input_params["k_points_grid"]),
)
expected_param_file = os.path.join(
out_dir, s, s + ".param"
)
expected_param_file = os.path.join(out_dir, s, s + ".param")
self.assertTrue(os.path.exists(expected_param_file))
with silence_stdio():
output_castep_param = read_param(expected_param_file).param
Expand Down Expand Up @@ -122,9 +116,7 @@ def check_write_dftb(self, out_dir: str, input_atoms: Atoms):
def check_write_uep(self, out_dir: str, input_params: dict):
for (rootDir, subDirs, files) in os.walk(out_dir):
for s in subDirs:
expected_file = os.path.join(
out_dir, s, s + ".yaml"
)
expected_file = os.path.join(out_dir, s, s + ".yaml")
self.assertTrue(os.path.exists(expected_file))
params = load_input_file(expected_file, UEPOptSchema)
self.assertEqual(params["geom_steps"], input_params["geom_steps"])
Expand All @@ -135,8 +127,8 @@ def run_uep(self, out_dir: str, uep_save_structs: bool = False):
if platform.system() == "Windows":
script_path = os.path.join(_TESTDATA_DIR, "script-uep-windows.ps1")
subprocess.run(
["powershell", "-File", os.path.normpath(script_path), out_dir]
)
["powershell", "-File", os.path.normpath(script_path), out_dir]
)
else:
subprocess.run([os.path.join(_TESTDATA_DIR, "script-uep"), out_dir])

Expand Down

0 comments on commit e3163b0

Please sign in to comment.