Skip to content

Commit

Permalink
pythongh-120418: Don't assume wheeldata is deleted if WHEEL_PKG_DIR
Browse files Browse the repository at this point in the history
… is set (python#120419)

Remove wheeldata from both sides of the `assertEqual`, so that we're
*actually* ignoring it from the test set.

This test is only making assertions about the source tree, no code is
being executed that would do anything different based on the value of
`WHEEL_PKG_DIR`.
  • Loading branch information
stefanor authored Jun 12, 2024
1 parent 3453362 commit 030b452
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Lib/test/test_tools/test_makefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_makefile_test_folders(self):
idle_test = 'idlelib/idle_test'
self.assertIn(idle_test, test_dirs)

used = [idle_test]
used = set([idle_test])
for dirpath, dirs, files in os.walk(support.TEST_HOME_DIR):
dirname = os.path.basename(dirpath)
# Skip temporary dirs:
Expand All @@ -65,13 +65,14 @@ def test_makefile_test_folders(self):
"of test directories to install"
)
)
used.append(relpath)
used.add(relpath)

# Don't check the wheel dir when Python is built --with-wheel-pkg-dir
if sysconfig.get_config_var('WHEEL_PKG_DIR'):
test_dirs.remove('test/wheeldata')
used.discard('test/wheeldata')

# Check that there are no extra entries:
unique_test_dirs = set(test_dirs)
self.assertSetEqual(unique_test_dirs, set(used))
self.assertSetEqual(unique_test_dirs, used)
self.assertEqual(len(test_dirs), len(unique_test_dirs))

0 comments on commit 030b452

Please sign in to comment.