Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
no regex
  • Loading branch information
neonene authored Jun 16, 2022
commit 383a32740810c9619da9ef925ee6901519ed32ea
6 changes: 3 additions & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,10 @@ def check_pre_config(self, configs, expected):
def check_config(self, configs, expected):
config = dict(configs['config'])
if MS_WINDOWS:
value = config.get('program_name')
value = config.get(key := 'program_name')
if value and isinstance(value, str):
ptn = r'_d\.exe$' if debug_build(sys.executable) else r'\.exe$'
config['program_name'] = re.sub(ptn, '', value, 1, re.IGNORECASE)
ext = '_d.exe' if debug_build(sys.executable) else '.exe'
config[key] = value[:len(value.lower().removesuffix(ext))]
for key, value in list(expected.items()):
if value is self.IGNORE_CONFIG:
config.pop(key, None)
Expand Down