2015-04-22 16:52:03 +01:00
|
|
|
# test attrtuple
|
|
|
|
# we can't test this type directly so we use sys.implementation object
|
|
|
|
|
|
|
|
import sys
|
|
|
|
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:
|
|
|
|
import sys
|
|
|
|
print("SKIP")
|
|
|
|
sys.exit()
|
|
|
|
|
|
|
|
|
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))
|