2015-04-22 17:52:03 +02:00
|
|
|
# test attrtuple
|
|
|
|
# we can't test this type directly so we use sys.implementation object
|
|
|
|
|
2022-08-18 08:57:45 +02:00
|
|
|
import sys
|
2015-04-22 17:52:03 +02:00
|
|
|
t = sys.implementation
|
|
|
|
|
2017-02-14 22:57:56 +01:00
|
|
|
# It can be just a normal tuple on small ports
|
|
|
|
try:
|
|
|
|
t.name
|
|
|
|
except AttributeError:
|
|
|
|
print("SKIP")
|
2017-06-10 19:03:01 +02:00
|
|
|
raise SystemExit
|
2017-02-14 22:57:56 +01:00
|
|
|
|
|
|
|
|
2015-04-22 17:52:03 +02:00
|
|
|
# test printing of attrtuple
|
|
|
|
print(str(t).find("version=") > 0)
|
|
|
|
|
|
|
|
# test read attr
|
|
|
|
print(isinstance(t.name, str))
|