Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 7 additions & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@

from collections import namedtuple
import os
import platform
import re
import subprocess
import sys


# AIX libc prints an empty string as '' rather than the string '(null)'
NULL_STR = '' if platform.system() == 'AIX' else '(null)'

class EmbeddingTestsMixin:
def setUp(self):
here = os.path.abspath(__file__)
Expand Down Expand Up @@ -256,7 +260,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'use_environment': 1,
'use_hash_seed': 0,
'hash_seed': 0,
'allocator': '(null)',
'allocator': NULL_STR,
'dev_mode': 0,
'faulthandler': 0,
'tracemalloc': 0,
Expand All @@ -270,11 +274,11 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'coerce_c_locale': 0,
'coerce_c_locale_warn': 0,

'pycache_prefix': '(null)',
'pycache_prefix': NULL_STR,
'program_name': './_testembed',
'argc': 0,
'argv': '[]',
'program': '(null)',
'program': NULL_STR,

'isolated': 0,
'site_import': 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix test_embed for AIX
Patch by Michael Felt