From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Tue, 13 Dec 2022 17:57:36 +0100
Subject: Skip test_high_number_of_file_descriptors

`forked` is incompatible with Pytest 7. Therefore skip
`test_high_number_of_file_descriptors` which is the only test that uses
`forked`.

Bug: https://github.com/cherrypy/cheroot/issues/502
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
---
 cheroot/test/test_server.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cheroot/test/test_server.py b/cheroot/test/test_server.py
index 430ad12..58c8512 100644
--- a/cheroot/test/test_server.py
+++ b/cheroot/test/test_server.py
@@ -372,7 +372,9 @@ def test_high_number_of_file_descriptors(native_server_client, resource_limit):
 ISSUE511 = IS_MACOS
 
 
-if not IS_WINDOWS and not ISSUE511:
+# Pytest 7 incompatible with forked.
+# See https://github.com/cherrypy/cheroot/issues/502
+if not IS_WINDOWS and not ISSUE511 and pytest.version_tuple[0] < 7:
     test_high_number_of_file_descriptors = pytest.mark.forked(
         test_high_number_of_file_descriptors,
     )
