5.4.0: pytest fails because missing `test.support`
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure but on first look looks lik eon file is missing in tests/
```console
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jaraco.test-5.4.0
configfile: pytest.ini
plugins: jaraco.test-5.4.0
collected 5 items / 1 deselected / 4 selected
jaraco/test/__init__.py . [ 25%]
jaraco/test/cpython.py FF [ 75%]
tests/test_http.py . [100%]
=================================== FAILURES ===================================
____________________________ [doctest] test.cpython ____________________________
001
002 Compatibility shims for getting stuff from test.support across
003 Python versions (for compatibility with Python 3.9 and earlier).
004
005 >>> os_helper = try_import('os_helper') or from_test_support('temp_dir')
UNEXPECTED EXCEPTION: ModuleNotFoundError("No module named 'test.support'")
Traceback (most recent call last):
File "/usr/lib64/python3.9/doctest.py", line 1334, in __run
exec(compile(example.source, filename, "single",
File "", line 1, in
File "/home/tkloczko/rpmbuild/BUILD/jaraco.test-5.4.0/jaraco/test/cpython.py", line 25, in from_test_support
import test.support
ModuleNotFoundError: No module named 'test.support'
/home/tkloczko/rpmbuild/BUILD/jaraco.test-5.4.0/jaraco/test/cpython.py:5: UnexpectedException
___________________ [doctest] test.cpython.from_test_support ___________________
018
019 Return a SimpleNamespace of names from test.support.
020
021 >>> support = from_test_support('swap_item')
UNEXPECTED EXCEPTION: ModuleNotFoundError("No module named 'test.support'")
Traceback (most recent call last):
File "/usr/lib64/python3.9/doctest.py", line 1334, in __run
exec(compile(example.source, filename, "single",
File "", line 1, in
File "/home/tkloczko/rpmbuild/BUILD/jaraco.test-5.4.0/jaraco/test/cpython.py", line 25, in from_test_support
import test.support
ModuleNotFoundError: No module named 'test.support'
/home/tkloczko/rpmbuild/BUILD/jaraco.test-5.4.0/jaraco/test/cpython.py:21: UnexpectedException
=========================== short test summary info ============================
FAILED jaraco/test/cpython.py::test.cpython
FAILED jaraco/test/cpython.py::test.cpython.from_test_support
================== 2 failed, 2 passed, 1 deselected in 0.14s ===================
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported command, `pytest -ra -m 'not network'`, on Python 3.9. Read `jaraco/test/cpython.py` and its doctests, then inspect the two failing doctest cases involving `from_test_support`. Done means the reported doctests no longer fail while the existing passing tests remain passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100