Skip to content

Commit

Permalink
Set pytest import mode to importlib (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebsmothers authored Mar 7, 2024
1 parent 624ba63 commit dc3bf64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 47 deletions.
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.

0 comments on commit dc3bf64

Please sign in to comment.