Message285008
I think it is worth to add special helper in test.support for using as a context manager:
with helper():
os.mkfifo(filename)
Then you could change its implementation without changing the testing code. For example:
@contextmanager
def helper():
try:
yield
except PermissionError as e:
raise unittest.SkipTest(str(e))
or
@contextmanager
def helper():
if android_not_root:
raise unittest.SkipTest("operation not allowed, non root user")
yield |
|
Date |
User |
Action |
Args |
2017-01-08 21:24:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, xdegaye, python-dev |
2017-01-08 21:24:43 | serhiy.storchaka | set | messageid: <1483910683.26.0.909834077318.issue28759@psf.upfronthosting.co.za> |
2017-01-08 21:24:43 | serhiy.storchaka | link | issue28759 messages |
2017-01-08 21:24:43 | serhiy.storchaka | create | |
|