Skip to content

Commit b907abc

Browse files
authored
bpo-30871: Add test.pythoninfo (#3075)
* Add Lib/test/pythoninfo.py: script collecting various informations about Python to help debugging test failures. * regrtest: remove sys.hash_info and sys.flags from header. * Travis CI, Appveyor: run pythoninfo before tests
1 parent 4a347ce commit b907abc

File tree

4 files changed

+410
-3
lines changed

4 files changed

+410
-3
lines changed

.github/appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ branches:
77
- buildbot-custom
88
build_script:
99
- cmd: PCbuild\build.bat -e
10+
- cmd: PCbuild\win32\python.exe -m test.pythoninfo
1011
test_script:
1112
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 --fail-env-changed -j0
1213
environment:

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ matrix:
6060
# Need a venv that can parse covered code.
6161
./python -m venv venv
6262
./venv/bin/python -m pip install -U coverage
63+
./venv/bin/python -m test.pythoninfo
6364
script:
6465
# Skip tests that re-run the entire test suite.
6566
- ./venv/bin/python -m coverage run --pylib -m test -uall,-cpu -x test_multiprocessing_fork -x test_multiprocessing_forkserver -x test_multiprocessing_spawn
@@ -87,6 +88,7 @@ before_script:
8788
echo "$changes"
8889
exit 1
8990
fi
91+
./python -m test.pythoninfo
9092
9193
script:
9294
# Using the built Python as patchcheck.py is built around the idea of using

Lib/test/libregrtest/main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,16 +424,13 @@ def display_header(self):
424424
print("==", platform.python_implementation(), *sys.version.split())
425425
print("==", platform.platform(aliased=True),
426426
"%s-endian" % sys.byteorder)
427-
print("== hash algorithm:", sys.hash_info.algorithm,
428-
"64bit" if sys.maxsize > 2**32 else "32bit")
429427
print("== cwd:", os.getcwd())
430428
cpu_count = os.cpu_count()
431429
if cpu_count:
432430
print("== CPU count:", cpu_count)
433431
print("== encodings: locale=%s, FS=%s"
434432
% (locale.getpreferredencoding(False),
435433
sys.getfilesystemencoding()))
436-
print("Testing with flags:", sys.flags)
437434

438435
def run_tests(self):
439436
# For a partial run, we do not need to clutter the output.

0 commit comments

Comments
 (0)