➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 serhiy.storchaka
收信人 python-dev, serhiy.storchaka, xdegaye
日期 2017-01-08.21:24:43
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1483910683.26.0.909834077318.issue28759@psf.upfronthosting.co.za>
In-reply-to
内容
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
历史
日期 用户 动作 参数
2017-01-08 21:24:43serhiy.storchaka修改recipients: + serhiy.storchaka, xdegaye, python-dev
2017-01-08 21:24:43serhiy.storchaka修改messageid: <1483910683.26.0.909834077318.issue28759@psf.upfronthosting.co.za>
2017-01-08 21:24:43serhiy.storchaka链接issue28759 messages
2017-01-08 21:24:43serhiy.storchaka创建