Skip to content

Commit

Permalink
Move IPYKERNEL_CELL_NAME from tox to pytest
Browse files Browse the repository at this point in the history
This allows pytest to be executed directly without tox and without
manual setting of the variable. Tox works well as before.
  • Loading branch information
frenzymadness committed Nov 9, 2021
1 parent 1a87c0b commit e32310e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions nbclient/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os

# This is important for ipykernel to show the same string
# instead of randomly generated file names in outputs.
# See: https://github.com/ipython/ipykernel/blob/360685c67c71cd33691c72c1e9e88d23a88f4021/ipykernel/compiler.py#L50-L55
os.environ["IPYKERNEL_CELL_NAME"] = "<IPY-INPUT>"
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ commands =
# disable Python's hash randomization for tests that stringify dicts, etc
setenv =
PYTHONHASHSEED = 0
IPYKERNEL_CELL_NAME = <IPY-INPUT>
passenv = *
basepython =
py36: python3.6
Expand Down

0 comments on commit e32310e

Please sign in to comment.