Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/uniform
- Loading branch information
Showing
4 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import sys | ||
|
||
|
||
collect_ignore = [ | ||
# this module fails mypy tests because 'setup.py' matches './setup.py' | ||
'prepare/example/setup.py', | ||
] | ||
|
||
|
||
def pytest_configure(): | ||
remove_importlib_metadata() | ||
|
||
|
||
def remove_importlib_metadata(): | ||
""" | ||
Because pytest imports importlib_metadata, the coverage | ||
reports are broken (#322). So work around the issue by | ||
undoing the changes made by pytest's import of | ||
importlib_metadata (if any). | ||
""" | ||
if sys.meta_path[-1].__class__.__name__ == 'MetadataPathFinder': | ||
del sys.meta_path[-1] | ||
for mod in list(sys.modules): | ||
if mod.startswith('importlib_metadata'): | ||
del sys.modules[mod] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters