--- /dev/null
+#!/usr/bin/python3
+
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+import os
+
+import pytest
+
+
+long_test = pytest.mark.skipif(not os.environ.get('CI_ENABLE_ALL_TESTS'),
+ reason='CI_ENABLE_ALL_TESTS not set')
+++ /dev/null
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# SPDX-License-Identifier: MPL-2.0
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, you can obtain one at https://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-import os
-import pytest
-
-
-def pytest_configure(config):
- config.addinivalue_line(
- "markers", "long: mark tests that take a long time to run"
- )
-
-
-def pytest_collection_modifyitems(config, items):
- # pylint: disable=unused-argument,unused-import,too-many-branches
- # pylint: disable=import-outside-toplevel
- skip_long_tests = pytest.mark.skip(
- reason="need CI_ENABLE_ALL_TESTS environment variable")
- if not os.environ.get("CI_ENABLE_ALL_TESTS"):
- for item in items:
- if "long" in item.keywords:
- item.add_marker(skip_long_tests)
import dns.rdataclass
import dns.rdatatype
+import pytest_custom_markers # pylint: disable=import-error
+
TIMEOUT = 10
raise EOFError from e
-@pytest.mark.long
+@pytest_custom_markers.long_test
def test_max_transfer_idle_out(named_port):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
sock.connect(("10.53.0.1", named_port))
assert soa is None
-@pytest.mark.long
+@pytest_custom_markers.long_test
def test_max_transfer_time_out(named_port):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
sock.connect(("10.53.0.1", named_port))