Skip to content

Commit e4c611e

Browse files
stefanornoahbkim
authored andcommitted
pythongh-120418: Don't assume wheeldata is deleted if WHEEL_PKG_DIR 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`.
1 parent f9809fa commit e4c611e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Lib/test/test_tools/test_makefile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_makefile_test_folders(self):
4141
idle_test = 'idlelib/idle_test'
4242
self.assertIn(idle_test, test_dirs)
4343

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

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

7475
# Check that there are no extra entries:
7576
unique_test_dirs = set(test_dirs)
76-
self.assertSetEqual(unique_test_dirs, set(used))
77+
self.assertSetEqual(unique_test_dirs, used)
7778
self.assertEqual(len(test_dirs), len(unique_test_dirs))

0 commit comments

Comments
 (0)