summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_embed.py
diff options
context:
space:
mode:
authorMichael Felt <aixtools@users.noreply.github.com>2018-09-15 09:28:31 (GMT)
committerVictor Stinner <vstinner@redhat.com>2018-09-15 09:28:31 (GMT)
commitd2067318c79f66cfdabc53333715a02d5fa5ff81 (patch)
tree1ca58850ff660c923c1c1aa1227d4e67f547c4ff /Lib/test/test_embed.py
parent3d07349d19dda1ff82167ad363b25e0181d5388e (diff)
downloadcpython-d2067318c79f66cfdabc53333715a02d5fa5ff81.zip
cpython-d2067318c79f66cfdabc53333715a02d5fa5ff81.tar.gz
cpython-d2067318c79f66cfdabc53333715a02d5fa5ff81.tar.bz2
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
Diffstat (limited to 'Lib/test/test_embed.py')
-rw-r--r--Lib/test/test_embed.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 9155c40..80233a5 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -4,11 +4,15 @@ import unittest
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__)
@@ -258,7 +262,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,
@@ -276,11 +280,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,