Document platform-specific coverage exclusion markers
Marco Ricci

Marco Ricci commited on 2026-02-01 20:51:53
Zeige 1 geänderte Dateien mit 14 Einfügungen und 0 Löschungen.

... ...
@@ -260,6 +260,20 @@ exclude_also = [
260 260
     '@(?:(?:pytest\.)?mark\.)?xfail\(',
261 261
     'class _Omitted:',
262 262
     'class _DummyModule:',
263
+
264
+    # If running only on POSIX, then you may want to enable the following
265
+    # exclusions for platform-specific code that will not trigger on POSIX:
266
+    #
267
+    # 'pragma: unless the-annoying-os no cover',
268
+
269
+    # If running only on The Annoying OS (Microsoft Windows), then you may
270
+    # want to enable the following exclusions for platform-specific code
271
+    # that will not trigger on The Annoying OS:
272
+    #
273
+    # 'pragma: unless posix no cover',
274
+    # '@(?:pytest_machinery\.)?skip_if_on_the_annoying_os',
275
+    # '@(?:pytest_machinery\.)?xfail_on_the_annoying_os',
276
+    # 'skip_if_no_af_unix_support: None,',
263 277
 ]
264 278
 
265 279
 # We use a bunch of "codes", similar to the "type: ignore" comments, as
266 280