-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test failures on older Pythons with os_helper shim. Copied 'from_…
…test_support' from importlib_resources.
- Loading branch information
Showing
4 changed files
with
22 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ testing = | |
pyfakefs | ||
flufl.flake8 | ||
pytest-perf >= 0.9.2 | ||
jaraco.collections | ||
|
||
docs = | ||
# upstream | ||
|
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,18 @@ | ||
import types | ||
|
||
from jaraco.collections import Projection | ||
|
||
|
||
def from_test_support(*names): | ||
""" | ||
Return a SimpleNamespace of names from test.support. | ||
""" | ||
import test.support | ||
|
||
return types.SimpleNamespace(**Projection(names, vars(test.support))) | ||
|
||
|
||
try: | ||
from test.support.os_helper import FS_NONASCII | ||
from test.support import os_helper # type: ignore | ||
except ImportError: | ||
from test.support import FS_NONASCII # noqa | ||
os_helper = from_test_support('FS_NONASCII', 'skip_unless_symlink') |
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