Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jul 16, 2023
1 parent 3a9b9b5 commit c817970
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_ipynb.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,13 @@ def test_cache_isnt_written_if_no_jupyter_deps_single(
nb = get_case_path("jupyter", "notebook_trailing_newline.ipynb")
tmp_nb = tmp_path / "notebook.ipynb"
tmp_nb.write_bytes(nb.read_bytes())
monkeypatch.setattr(
"black.jupyter_dependencies_are_installed", lambda warn: False
)
monkeypatch.setattr("black.jupyter_dependencies_are_installed", lambda warn: False)
result = runner.invoke(
main, [str(tmp_path / "notebook.ipynb"), f"--config={EMPTY_CONFIG}"]
)
assert "No Python files are present to be formatted. Nothing to do" in result.output
jupyter_dependencies_are_installed.cache_clear()
monkeypatch.setattr(
"black.jupyter_dependencies_are_installed", lambda warn: True
)
monkeypatch.setattr("black.jupyter_dependencies_are_installed", lambda warn: True)
result = runner.invoke(
main, [str(tmp_path / "notebook.ipynb"), f"--config={EMPTY_CONFIG}"]
)
Expand Down

0 comments on commit c817970

Please sign in to comment.