@@ -1153,7 +1153,9 @@ def test_sched_getaffinity(self):
1153
1153
mask = posix .sched_getaffinity (0 )
1154
1154
self .assertIsInstance (mask , set )
1155
1155
self .assertGreaterEqual (len (mask ), 1 )
1156
- self .assertRaises (OSError , posix .sched_getaffinity , - 1 )
1156
+ if not sys .platform .startswith ("freebsd" ):
1157
+ # bpo-47205: does not raise OSError on FreeBSD
1158
+ self .assertRaises (OSError , posix .sched_getaffinity , - 1 )
1157
1159
for cpu in mask :
1158
1160
self .assertIsInstance (cpu , int )
1159
1161
self .assertGreaterEqual (cpu , 0 )
@@ -1171,7 +1173,9 @@ def test_sched_setaffinity(self):
1171
1173
self .assertRaises (ValueError , posix .sched_setaffinity , 0 , [- 10 ])
1172
1174
self .assertRaises (ValueError , posix .sched_setaffinity , 0 , map (int , "0X" ))
1173
1175
self .assertRaises (OverflowError , posix .sched_setaffinity , 0 , [1 << 128 ])
1174
941C
- self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
1176
+ if not sys .platform .startswith ("freebsd" ):
1177
+ # bpo-47205: does not raise OSError on FreeBSD
1178
+ self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
1175
1179
1176
1180
def test_rtld_constants (self ):
1177
1181
# check presence of major RTLD_* constants
0 commit comments