@@ -1660,14 +1660,17 @@ def test_setsigdef_wrong_type(self):
16601660
16611661 @requires_sched
16621662 def test_setscheduler_only_param (self ):
1663+ if sys .platform .startswith (('freebsd' , 'netbsd' , 'openbsd' , 'gnukfreebsd' )):
1664+ raise unittest .SkipTest ("test may fail on BSD" )
1665+
16631666 policy = os .sched_getscheduler (0 )
16641667 priority = os .sched_get_priority_min (policy )
16651668 code = textwrap .dedent (f"""\
1666- import os
1669+ import os, sys
16671670 if os.sched_getscheduler(0) != { policy } :
1668- os .exit(101)
1671+ sys .exit(101)
16691672 if os.sched_getparam(0).sched_priority != { priority } :
1670- os .exit(102)""" )
1673+ sys .exit(102)""" )
16711674 pid = posix .posix_spawn (
16721675 sys .executable ,
16731676 [sys .executable , '-c' , code ],
@@ -1678,14 +1681,17 @@ def test_setscheduler_only_param(self):
16781681
16791682 @requires_sched
16801683 def test_setscheduler_with_policy (self ):
1684+ if sys .platform .startswith (('freebsd' , 'netbsd' , 'openbsd' , 'gnukfreebsd' )):
1685+ raise unittest .SkipTest ("test may fail on BSD" )
1686+
16811687 policy = os .sched_getscheduler (0 )
16821688 priority = os .sched_get_priority_min (policy )
16831689 code = textwrap .dedent (f"""\
1684- import os
1690+ import os, sys
16851691 if os.sched_getscheduler(0) != { policy } :
1686- os .exit(101)
1692+ sys .exit(101)
16871693 if os.sched_getparam(0).sched_priority != { priority } :
1688- os .exit(102)""" )
1694+ sys .exit(102)""" )
16891695 pid = posix .posix_spawn (
16901696 sys .executable ,
16911697 [sys .executable , '-c' , code ],
0 commit comments