summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2023-09-14 14:47:30 +0200
committerThomas Waldmann <tw@waldmann-edv.de>2023-09-14 14:47:30 +0200
commit12e224613e9cf724f50233343296db10c1a4ea38 (patch)
tree59354adfad94767665c6cb045b609cd788599569 /src
parent95e75b90f1a092bad10e0b93ef065e78dfabb227 (diff)
test_is_slow_msgpack: skip test on expected slow msgpack environments
Diffstat (limited to 'src')
-rw-r--r--src/borg/testsuite/helpers.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/borg/testsuite/helpers.py b/src/borg/testsuite/helpers.py
index bbc3a25a3..9a09739e6 100644
--- a/src/borg/testsuite/helpers.py
+++ b/src/borg/testsuite/helpers.py
@@ -908,7 +908,22 @@ def test_parse_file_size_invalid(string):
parse_file_size(string)
-@pytest.mark.skipif(is_cygwin, reason="ignore slow msgpack on cygwin")
+def expected_py_mp_slow_combination():
+ """do we expect msgpack to be slow in this environment?"""
+ # we need to import upstream msgpack package here, not helpers.msgpack:
+ import msgpack
+
+ # msgpack is slow on cygwin
+ if is_cygwin:
+ return True
+ # msgpack < 1.0.6 did not have py312 wheels
+ if sys.version_info[:2] == (3, 12) and msgpack.version < (1, 0, 6):
+ return True
+ # otherwise we expect msgpack to be fast!
+ return False
+
+
+@pytest.mark.skipif(expected_py_mp_slow_combination(), reason="ignore expected slow msgpack")
def test_is_slow_msgpack():
# we need to import upstream msgpack package here, not helpers.msgpack:
import msgpack