Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set pytest import mode to importlib #460

Merged
merged 3 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ check-return-types = 'False'
exclude = 'tests/torchtune/models/llama2/scripts/'

[tool.pytest.ini_options]
addopts = ["--showlocals"] # show local variables in tracebacks
addopts = ["--showlocals", "--import-mode=importlib"]
# --showlocals will show local variables in tracebacks
# --import-model=importlib ensures pytest doesn't append the repo root to sys.path,
# causing our tests to bypass legitimate import errors
46 changes: 0 additions & 46 deletions tests/recipes/configs/test_configs.py

This file was deleted.

Loading