diff --git a/setup.cfg b/setup.cfg index f67df574..02d3c7e8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,7 @@ testing = pyfakefs flufl.flake8 pytest-perf >= 0.9.2 - jaraco.collections + jaraco.test >= 5.4 docs = # upstream diff --git a/tests/compat/py39.py b/tests/compat/py39.py index b01ecad8..0f6f9c3a 100644 --- a/tests/compat/py39.py +++ b/tests/compat/py39.py @@ -1,18 +1,6 @@ -import types +from jaraco.test.cpython import from_test_support, try_import -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 import os_helper # type: ignore -except ImportError: - os_helper = from_test_support('FS_NONASCII', 'skip_unless_symlink') +os_helper = try_import('os_helper') or from_test_support( + 'FS_NONASCII', 'skip_unless_symlink' +)