Skip to content

test_unload_tests fails in Python 3.11 when executed from an installed directory #113862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pablogsal opened this issue Jan 9, 2024 · 3 comments

Comments

@pablogsal
Copy link
Member

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/pgalindo3/github/python/3.11/inss/lib/python3.11/test/__main__.py", line 2, in <module>
    main(_add_python_opts=True)
  File "/Users/pgalindo3/github/python/3.11/inss/lib/python3.11/test/libregrtest/main.py", line 672, in main
    Regrtest(ns, _add_python_opts=_add_python_opts).main(tests=tests)
  File "/Users/pgalindo3/github/python/3.11/inss/lib/python3.11/test/libregrtest/main.py", line 654, in main
    selected, tests = self.find_tests(tests)
                      ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgalindo3/github/python/3.11/inss/lib/python3.11/test/libregrtest/main.py", line 191, in find_tests
    alltests = findtests(testdir=self.test_dir,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgalindo3/github/python/3.11/inss/lib/python3.11/test/libregrtest/findtests.py", line 41, in findtests
    for name in os.listdir(testdir):
                ^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/pgalindo3/github/python/3.11/inss/lib/python3.11/test/regrtestdata/import_from_tests'

---

Seems that this is due to #108952 not updating the makefile so regrtestdata is not copied during installation.

Steps to reproduce:

 ./configure -C --prefix=$PWD/inss
make install -j
./inss/bin/python3.11 -m test test_regrtest -v
@pablogsal
Copy link
Member Author

CC: @serhiy-storchaka

@pablogsal
Copy link
Member Author

Looks like commit f8c0198e3bf is missing from 3.11.7

@pablogsal
Copy link
Member Author

Oh, I can see that this was patched in #112784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant