Skip to content

Commit

Permalink
Simplyfy, and make stricter, cookbook cli tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrost-mo committed Dec 19, 2023
1 parent 469ab4d commit b1f519f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,10 @@ def test_graph_details(tmp_path: Path):
assert output_file.is_file()


def test_cookbook_cwd(tmp_path: Path):
def test_cookbook_cwd(tmp_working_dir):
"""Unpacking the recipes into the current working directory."""
cwd = Path.cwd()
os.chdir(tmp_path)
subprocess.run(["cset", "cookbook"], check=True)
assert Path("extract_instant_air_temp.yaml").is_file()
os.chdir(cwd)


def test_cookbook_path(tmp_path: Path):
Expand All @@ -121,7 +118,7 @@ def test_cookbook_detail_recipe():
capture_output=True,
check=True,
)
assert proc.stdout.startswith(b"\n\textract_instant_air_temp")
assert proc.stdout.startswith(b"\n\textract_instant_air_temp\n")


def test_bake_invalid_args():
Expand Down

0 comments on commit b1f519f

Please sign in to comment.