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