Commit d2067318 authored by Michael Felt's avatar Michael Felt Committed by Victor Stinner

bpo-34579: Fix test_embed DEFAULT_CON AIX (GH-9063)

* Modify DEFAULT_CONFIG for AIX

* bedevere/news did not like old name

* Modify NEWS entry

* Modified per peer review

* Define and use NULL_STR constant to account for AIX libc behavior

* Modify per peer review

* Modify NEWS
parent 3d07349d
...@@ -4,11 +4,15 @@ import unittest ...@@ -4,11 +4,15 @@ import unittest
from collections import namedtuple from collections import namedtuple
import os import os
import platform
import re import re
import subprocess import subprocess
import sys import sys
# AIX libc prints an empty string as '' rather than the string '(null)'
NULL_STR = '' if platform.system() == 'AIX' else '(null)'
class EmbeddingTestsMixin: class EmbeddingTestsMixin:
def setUp(self): def setUp(self):
here = os.path.abspath(__file__) here = os.path.abspath(__file__)
...@@ -258,7 +262,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): ...@@ -258,7 +262,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'use_environment': 1, 'use_environment': 1,
'use_hash_seed': 0, 'use_hash_seed': 0,
'hash_seed': 0, 'hash_seed': 0,
'allocator': '(null)', 'allocator': NULL_STR,
'dev_mode': 0, 'dev_mode': 0,
'faulthandler': 0, 'faulthandler': 0,
'tracemalloc': 0, 'tracemalloc': 0,
...@@ -276,11 +280,11 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): ...@@ -276,11 +280,11 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'coerce_c_locale': 0, 'coerce_c_locale': 0,
'coerce_c_locale_warn': 0, 'coerce_c_locale_warn': 0,
'pycache_prefix': '(null)', 'pycache_prefix': NULL_STR,
'program_name': './_testembed', 'program_name': './_testembed',
'argc': 0, 'argc': 0,
'argv': '[]', 'argv': '[]',
'program': '(null)', 'program': NULL_STR,
'isolated': 0, 'isolated': 0,
'site_import': 1, 'site_import': 1,
......
Fix test_embed for AIX
Patch by Michael Felt
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment