-
-
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.
Consolidated test support logic in jaraco.test.cpython.
- Loading branch information
Showing
2 changed files
with
5 additions
and
17 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
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,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' | ||
) |