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
Next Next commit
str check
  • Loading branch information
neonene authored Jun 16, 2022
commit 4bd62a40fb66f57997a2f1f0b2fc0ef643e20244
8 changes: 5 additions & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,11 @@ def check_pre_config(self, configs, expected):

def check_config(self, configs, expected):
config = dict(configs['config'])
if MS_WINDOWS and (value := config.get('program_name')):
ptn = r'_d\.exe$' if debug_build(sys.executable) else r'\.exe$'
config['program_name'] = re.sub(ptn, '', value, 1, re.I)
if MS_WINDOWS:
value = config.get('program_name')
if value and isinstance(value, str):
ptn = '_d.exe$' if debug_build(sys.executable) else '.exe$'
config['program_name'] = re.sub(ptn, '', value, 1, re.IGNORECASE)
for key, value in list(expected.items()):
if value is self.IGNORE_CONFIG:
config.pop(key, None)
Expand Down