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.

Author serhiy.storchaka
Recipients python-dev, serhiy.storchaka, xdegaye
Date 2017-01-12.11:20:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
The purpose of this helper is skipping the test rather than failing if some OS operation is not permitted by current configuration. May be skip_if_not_permitted()?

Similar helpers that convert runtime error in skipping a test: import_module(), get_attribute(), bind_unix_socket(), system_must_validate_cert(). They are more concrete, guard some specific operation.

Context manager is not the only possible syntax. The helper can call a function:

    helper(os.mkfifo, filename)

or be a wrapper:

    helper(os.mkfifo)(filename)

If you prefer such syntax.

There are many possibilities, and I think it is worth to discuss this on Python-Dev.
History
Date User Action Args
2017-01-12 11:20:52serhiy.storchakasetrecipients: + serhiy.storchaka, xdegaye, python-dev
2017-01-12 11:20:52serhiy.storchakasetmessageid: <[email protected]>
2017-01-12 11:20:52serhiy.storchakalinkissue28759 messages
2017-01-12 11:20:51serhiy.storchakacreate