Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_makefile_test_folders fails if test/wheeldata is empty #117711

Closed
@befeleme

Description

@befeleme

Bug report

Bug description:

In Fedora, when packaging Python, we remove the .whl files from Lib/test/wheeldata/. The directory is left empty.
test_makefile has started to skip empty directories as of alpha 6 (#117190). It doesn't include them in the list of used which are then checked for equality with unique_test_dirs. This causes the test to fail in our environment.

The test could be more robust and account for sysconfig.get_config_var('WHEEL_PKG_DIR'). If this is present, then it shouldn't expect that test/wheeldata is among the tested directories. (#105056)

Traceback for completness:

test_makefile_test_folders (test.test_tools.test_makefile.TestMakefile.test_makefile_test_folders) ... FAIL

======================================================================
FAIL: test_makefile_test_folders (test.test_tools.test_makefile.TestMakefile.test_makefile_test_folders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.13.0a6/Lib/test/test_tools/test_makefile.py", line 72, in test_makefile_test_folders
    self.assertSetEqual(unique_test_dirs, set(used))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Items in the first set but not the second:
'test/wheeldata'

----------------------------------------------------------------------
Ran 1 test in 0.033s

FAILED (failures=1)

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions