@@ -1194,7 +1194,9 @@ def test_sched_getaffinity(self):
11941194 mask = posix .sched_getaffinity (0 )
11951195 self .assertIsInstance (mask , set )
11961196 self .assertGreaterEqual (len (mask ), 1 )
1197- self .assertRaises (OSError , posix .sched_getaffinity , - 1 )
1197+ if not sys .platform .startswith ("freebsd" ):
1198+ # bpo-47205: does not raise OSError on FreeBSD
1199+ self .assertRaises (OSError , posix .sched_getaffinity , - 1 )
11981200 for cpu in mask :
11991201 self .assertIsInstance (cpu , int )
12001202 self .assertGreaterEqual (cpu , 0 )
@@ -1212,7 +1214,9 @@ def test_sched_setaffinity(self):
12121214 self .assertRaises (ValueError , posix .sched_setaffinity , 0 , [- 10 ])
12131215 self .assertRaises (ValueError , posix .sched_setaffinity , 0 , map (int , "0X" ))
12141216 self .assertRaises (OverflowError , posix .sched_setaffinity , 0 , [1 << 128 ])
1215- self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
1217+ if not sys .platform .startswith ("freebsd" ):
1218+ # bpo-47205: does not raise OSError on FreeBSD
1219+ self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
12161220
12171221 def test_rtld_constants (self ):
12181222 # check presence of major RTLD_* constants
0 commit comments