summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-18 00:30:03 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-18 00:30:03 (GMT)
commit3bc3aaab1360f27a8208b98cc54a35a0a2542715 (patch)
tree49c3937923028bcaae4bbc74c0fe2a246bb13e37 /Lib/test/support
parent79c3bcf2f7bdb88bbe1edbee313c4b6d31887ec2 (diff)
downloadcpython-3bc3aaab1360f27a8208b98cc54a35a0a2542715.zip
cpython-3bc3aaab1360f27a8208b98cc54a35a0a2542715.tar.gz
cpython-3bc3aaab1360f27a8208b98cc54a35a0a2542715.tar.bz2
Issue #20667: test_asyncio: Skip KqueueEventLoopTests.test_read_pty_output() on
OpenBSD older than 5.5
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 9857f9d..05e58b2 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -78,6 +78,7 @@ __all__ = [
"create_empty_file", "can_symlink", "fs_is_case_insensitive",
# unittest
"is_resource_enabled", "requires", "requires_freebsd_version",
+ "requires_openbsd_version",
"requires_linux_version", "requires_mac_ver", "check_syntax_error",
"TransientResource", "time_out", "socket_peer_reset", "ioerror_peer_reset",
"transient_internet", "BasicTestRunner", "run_unittest", "run_doctest",
@@ -467,6 +468,15 @@ def requires_freebsd_version(*min_version):
"""
return _requires_unix_version('FreeBSD', min_version)
+def requires_openbsd_version(*min_version):
+ """Decorator raising SkipTest if the OS is OpenBSD and the OpenBSD version
+ is less than `min_version`.
+
+ For example, @requires_freebsd_version(5, 4) raises SkipTest if the FreeBSD
+ version is less than 5.4.
+ """
+ return _requires_unix_version('OpenBSD', min_version)
+
def requires_linux_version(*min_version):
"""Decorator raising SkipTest if the OS is Linux and the Linux version is
less than `min_version`.