@@ -1179,7 +1179,9 @@ def test_sched_getaffinity(self):
1179
1179
mask = posix .sched_getaffinity (0 )
1180
1180
self .assertIsInstance (mask , set )
1181
1181
self .assertGreaterEqual (len (mask ), 1 )
1182
- self .assertRaises (OSError , posix .sched_getaffinity , - 1 )
1182
+ if not sys .platform .startswith ("freebsd" ):
1183
+ # bpo-47205: does not raise OSError on FreeBSD
1184
+ self .assertRaises (OSError , posix .sched_getaffinity , - 1 )
1183
1185
for cpu in mask :
1184
1186
self .assertIsInstance (cpu , int )
1185
1187
self .assertGreaterEqual (cpu , 0 )
@@ -1197,7 +1199,9 @@ def test_sched_setaffinity(self):
1197
1199
self .assertRaises (ValueError , posix .sched_setaffinity , 0 , [- 10 ])
1198
1200
self .assertRaises (ValueError , posix .sched_setaffinity , 0 , map (int , "0X" ))
1199
1201
self .assertRaises (OverflowError , posix .sched_setaffinity , 0 , [1 << 128 ])
<
8000
code>1200
- self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
1202
+ if not sys .platform .startswith ("freebsd" ):
1203
+ # bpo-47205: does not raise OSError on FreeBSD
1204
+ self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
1201
1205
1202
1206
def test_rtld_constants (self ):
1203
1207
# check presence of major RTLD_* constants
0 commit comments