run_test.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. import platform
  2. import re
  3. import sys
  4. import subprocess
  5. armv6l = bool(platform.machine() == 'armv6l')
  6. armv7l = bool(platform.machine() == 'armv7l')
  7. ppc64le = bool(platform.machine() == 'ppc64le')
  8. aarch64 = bool(platform.machine() == 'aarch64')
  9. if sys.platform == 'darwin':
  10. osx105 = b'10.5.' in subprocess.check_output('sw_vers')
  11. else:
  12. osx105 = False
  13. print('sys.version:', sys.version)
  14. print('sys.platform:', sys.platform)
  15. print('tuple.__itemsize__:', tuple.__itemsize__)
  16. if sys.platform == 'win32':
  17. assert 'MSC v.19' in sys.version
  18. print('sys.maxunicode:', sys.maxunicode)
  19. print('platform.architecture:', platform.architecture())
  20. print('platform.python_version:', platform.python_version())
  21. import _bisect
  22. import _codecs_cn
  23. import _codecs_hk
  24. import _codecs_iso2022
  25. import _codecs_jp
  26. import _codecs_kr
  27. import _codecs_tw
  28. import _collections
  29. import _csv
  30. import _ctypes
  31. import _ctypes_test
  32. import _decimal
  33. import _elementtree
  34. import _functools
  35. import _hashlib
  36. import _heapq
  37. import _io
  38. import _json
  39. import _locale
  40. import _lsprof
  41. import _lzma
  42. import _multibytecodec
  43. import _multiprocessing
  44. import _random
  45. import _socket
  46. import _sqlite3
  47. import _ssl
  48. import _struct
  49. import _testcapi
  50. import array
  51. import audioop
  52. import binascii
  53. import bz2
  54. import cmath
  55. import datetime
  56. import itertools
  57. import lzma
  58. import math
  59. import mmap
  60. import operator
  61. import parser
  62. import pyexpat
  63. import select
  64. import time
  65. import test
  66. import test.support
  67. import unicodedata
  68. import zlib
  69. from os import urandom
  70. import os
  71. t = 100 * b'Foo '
  72. assert lzma.decompress(lzma.compress(t)) == t
  73. if sys.platform != 'win32':
  74. fedora_pat = re.compile('.*\.fc\d+\.aarch64')
  75. if not (ppc64le or armv7l):
  76. import _curses
  77. import _curses_panel
  78. if not fedora_pat.match(platform.release()):
  79. import crypt
  80. import fcntl
  81. import grp
  82. import nis
  83. import readline
  84. import resource
  85. import syslog
  86. import termios
  87. if not (armv6l or armv7l or ppc64le or osx105 or aarch64):
  88. import tkinter
  89. import turtle
  90. import _tkinter
  91. print('TK_VERSION: %s' % _tkinter.TK_VERSION)
  92. print('TCL_VERSION: %s' % _tkinter.TCL_VERSION)
  93. if sys.platform == 'win32':
  94. TCLTK_VER = '8.6'
  95. else:
  96. TCLTK_VER = os.getenv("tk")
  97. assert _tkinter.TK_VERSION == _tkinter.TCL_VERSION == TCLTK_VER