Skip to content

Commit

Permalink
Don't rely on newlines being in output given systems
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Oct 9, 2020
1 parent d8e2761 commit b72e399
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,12 +612,12 @@ def test_missing_contrib_extra(caplog):
import_module("pyhf.cli")

with caplog.at_level(logging.ERROR):
assert (
"import of requests halted; None in sys.modules"
+ "\nInstallation of the contrib extra is required to use pyhf.contrib.utils.download"
+ "\nPlease install with: python -m pip install pyhf[contrib]"
in caplog.text
)
for line in [
"import of requests halted; None in sys.modules",
"Installation of the contrib extra is required to use pyhf.contrib.utils.download",
"Please install with: python -m pip install pyhf[contrib]",
]:
assert line in caplog.text
caplog.clear()


Expand Down Expand Up @@ -652,12 +652,12 @@ def test_missing_contrib_download(caplog):
assert result.exit_code == 0

with caplog.at_level(logging.ERROR):
assert (
"module 'pyhf.contrib.utils' has no attribute 'download'"
+ "\nInstallation of the contrib extra is required to use the contrib CLI API"
+ "\nPlease install with: python -m pip install pyhf[contrib]"
in caplog.text
)
for line in [
"module 'pyhf.contrib.utils' has no attribute 'download'",
"Installation of the contrib extra is required to use the contrib CLI API",
"Please install with: python -m pip install pyhf[contrib]",
]:
assert line in caplog.text
caplog.clear()


Expand Down

0 comments on commit b72e399

Please sign in to comment.