@@ -1194,7 +1194,9 @@ def test_sched_getaffinity(self):
1194
1194
mask = posix .sched_getaffinity (0 )
1195
1195
self .assertIsInstance (mask , set )
1196
1196
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 )
1198
1200
for cpu in mask :
1199
1201
self .assertIsInstance (cpu , int )
1200
1202
self .assertGreaterEqual (cpu , 0 )
@@ -1212,7 +1214,9 @@ def test_sched_setaffinity(self):
1212
1214
self .assertRaises (ValueError , posix .sched_setaffinity , 0 , [- 10 ])
1213
1215
self .assertRaises (ValueError , posix .sched_setaffinity , 0 , map (int , "0X" ))
1214
1216
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 )
1216
1220
1217
1221
def test_rtld_constants (self ):
1218
1222
# check presence of major RTLD_* constants
0 commit comments