Skip to content

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

Description

@pablogsal
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions