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__)
'use_environment': 1,
'use_hash_seed': 0,
'hash_seed': 0,
- 'allocator': '(null)',
+ 'allocator': NULL_STR,
'dev_mode': 0,
'faulthandler': 0,
'tracemalloc': 0,
'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,