gh-118351: Adapt support.TEST_MODULES_ENABLED for builds without the config variable (GH-118354)

This commit is contained in:
Kirill Podoprigora 2024-04-29 18:50:11 +03:00 committed by GitHub
parent 44f57a952e
commit 51c70de998
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -1181,8 +1181,9 @@ def requires_limited_api(test):
return test
TEST_MODULES_ENABLED = sysconfig.get_config_var('TEST_MODULES') == 'yes'
# Windows build doesn't support --disable-test-modules feature, so there's no
# 'TEST_MODULES' var in config
TEST_MODULES_ENABLED = (sysconfig.get_config_var('TEST_MODULES') or 'yes') == 'yes'
def requires_specialization(test):
return unittest.skipUnless(