Skip to content

Commit

Permalink
Use patch.open() instead of .read_text()
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Nov 20, 2023
1 parent 4d34dbd commit 8309be1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,14 @@ def test_patch(tmp_path, script_runner):

command = f'pyhf cls {temp} --patch -'

ret = script_runner.run(shlex.split(command), stdin=patch.read_text())
ret = script_runner.run(shlex.split(command), stdin=patch.open())
assert ret.success

output_dir_path = tmp_path / "output_2"
output_dir_path.mkdir(exist_ok=True)

command = f"pyhf json2xml {temp} --output-dir {output_dir_path} --patch -"
ret = script_runner.run(shlex.split(command), stdin=patch.read_text())
ret = script_runner.run(shlex.split(command), stdin=patch.open())
assert ret.success


Expand Down

0 comments on commit 8309be1

Please sign in to comment.