Skip to content

Commit

Permalink
Consolidated test support logic in jaraco.test.cpython.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 20, 2024
1 parent 41ca039 commit e30a16d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -37,7 +37,7 @@ testing =
pyfakefs
flufl.flake8
pytest-perf >= 0.9.2
jaraco.collections
jaraco.test >= 5.4

docs =
# upstream
Expand Down
20 changes: 4 additions & 16 deletions 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'
)

0 comments on commit e30a16d

Please sign in to comment.