Replies: 1 comment 2 replies
-
Hi @tkonopka! Thanks for reporting this! As you suggest, it should definitely be set |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all. I am trying to set up pytorch-lightning for the first time, following
tests/README.md
to run the test suite, and experiencing a minor glitch. I would like to ask for feedback if this is something to follow up or not.Running
make test
on a local machine gives one failed test:test_default_attributes
intests/plugins/environments/test_slurm_environments.py
. It fails here because it eventually expectsos.environ["SLURM_LOCALID"]
to throw a KeyError, but 'SLURM_LOCALID' turns out to be defined in the environment and KeyError does not happen.The same test case passes when triggered through
python -m pytest tests/
.I found two ways to avoid the error:
clear=True
in the decorator for the specific test case here. i.e. replace that line with@mock.patch.dict(os.environ, {}, clear=True)
I am not sure if these are reasonable in the big picture. Your thoughts would be appreciated: is this something to handle locally only, or could be mentioned in the README, or is it a bug?
Many thanks
Beta Was this translation helpful? Give feedback.
All reactions