bpo-30871: Add test.pythoninfo (#3075) · python/cpython@b907abc

4 files changed

lines changed

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:

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

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.