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