Skip to content

Commit 75a3420

Browse files
committed
fix test for current numpy versions
1 parent 48cecbb commit 75a3420

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/test_scorep.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
import re
88
import subprocess
99
import sys
10+
import numpy
11+
12+
13+
def version_tuple(v):
14+
return tuple(map(int, (v.split("."))))
1015

1116

1217
def call(arguments, expected_returncode=0, env=None):
@@ -393,6 +398,10 @@ def test_dummy(scorep_env):
393398

394399

395400
@pytest.mark.skipif(sys.version_info.major < 3, reason="not tested for python 2")
401+
@requires_package("numpy")
402+
@pytest.mark.skipif(version_tuple(numpy.version.version) >= version_tuple("1.22.0"),
403+
reason="There are some changes regarding __array_function__ in 1.22.0,"
404+
"so the test is no longer needed")
396405
@foreach_instrumenter
397406
def test_numpy_dot(scorep_env, instrumenter):
398407
trace_path = get_trace_path(scorep_env)

0 commit comments

Comments
 (0)