Skip to content
Snippets Groups Projects
Commit 417f0ecf authored by Florian Bruhin's avatar Florian Bruhin
Browse files

Fix coverage on CI

parent 75d57d3b
No related branches found
No related tags found
No related merge requests found
Pipeline #203685 passed
......@@ -117,17 +117,19 @@ class TestArgumentParsing:
nb_path = tmp_path / "nb.ipynb"
nb_path.touch()
nb_path.chmod(0)
if os.access(nb_path, os.R_OK):
pytest.skip("failed to make file unreadable") # pragma: no cover
result = runner.run(nb_path)
if os.access(nb_path, os.R_OK): # pragma: no cover
# doesn't work on CI due to Docker weirdness
pytest.skip("failed to make file unreadable")
else: # pragma: no cover
result = runner.run(nb_path)
msg = f"Invalid value for 'NOTEBOOK': File '{nb_path}' is not readable."
expected.usage_lines()
expected.error_panel(msg)
expected.exit_code = 2
msg = f"Invalid value for 'NOTEBOOK': File '{nb_path}' is not readable."
expected.usage_lines()
expected.error_panel(msg)
expected.exit_code = 2
expected.check(result)
expected.check(result)
def test_wrong_location(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment