summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-12 19:51:55 (GMT)
committerGitHub <noreply@github.com>2024-06-12 19:51:55 (GMT)
commitf7237284b9c1768e6feb19abfad1ec54ac44ad87 (patch)
treeb77c0e894310e9c0bc843c0ed713deb156768e9f
parent51724620e868512bbedb1547aca441bcd27bbe0c (diff)
downloadcpython-f7237284b9c1768e6feb19abfad1ec54ac44ad87.zip
cpython-f7237284b9c1768e6feb19abfad1ec54ac44ad87.tar.gz
cpython-f7237284b9c1768e6feb19abfad1ec54ac44ad87.tar.bz2
[3.13] gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (GH-120419) (#120432)
gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (GH-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`. (cherry picked from commit 030b452e34bbb0096acacb70a31915b9590c8186) Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
-rw-r--r--Lib/test/test_tools/test_makefile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_tools/test_makefile.py b/Lib/test/test_tools/test_makefile.py
index 48a7c1a..df95e6d 100644
--- a/Lib/test/test_tools/test_makefile.py
+++ b/Lib/test/test_tools/test_makefile.py
@@ -41,7 +41,7 @@ class TestMakefile(unittest.TestCase):
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:
@@ -65,13 +65,14 @@ class TestMakefile(unittest.TestCase):
"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))