diff --git a/test/test_cli.py b/test/test_cli.py index f1be000..d4cc647 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -97,7 +97,10 @@ def test_parse_config(self): def test_cli(self): # Simple - use config. fname = "UT.STN11.A2_C150" - subprocess.run(f"hvsrpy --config {self.full_path}data/cli/settings_cli_simple.cfg --no_time {self.full_path}data/a2/{fname}.miniseed") + subprocess.run(["hvsrpy", "--no_time", "--config", + f"{self.full_path}data/cli/settings_cli_simple.cfg", + f"{self.full_path}data/a2/{fname}.miniseed"], + check=True) self.assertTrue(os.path.exists(f"{fname}_hvsrpy.hv")) self.assertTrue(os.path.exists(f"{fname}.png")) os.remove(f"{fname}_hvsrpy.hv") @@ -105,15 +108,15 @@ def test_cli(self): # Azimuthal - use config. fname = "UT.STN11.A2_C150" - subprocess.run(f"hvsrpy --config {self.full_path}data/cli/settings_cli_azimuthal.cfg --no_time {self.full_path}data/a2/{fname}.miniseed") + subprocess.run(["hvsrpy", "--no_time", "--config", + f"{self.full_path}data/cli/settings_cli_azimuthal.cfg", + f"{self.full_path}data/a2/{fname}.miniseed"], + check=True) self.assertTrue(os.path.exists(f"{fname}_hvsrpy_az.hv")) self.assertTrue(os.path.exists(f"{fname}_az.png")) os.remove(f"{fname}_hvsrpy_az.hv") os.remove(f"{fname}_az.png") - - - if __name__ == "__main__": unittest.main()