We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ecbf2e9 + d5af434 commit 96b2997Copy full SHA for 96b2997
yt/testing.py
@@ -13,7 +13,6 @@
13
14
import matplotlib
15
import numpy as np
16
-import pytest
17
from more_itertools import always_iterable
18
from numpy.random import RandomState
19
from unyt.exceptions import UnitOperationError
@@ -939,6 +938,9 @@ def requires_module_pytest(*module_names):
939
938
940
So that it can be later renamed to `requires_module`.
941
"""
+ # note: import pytest here so that it is not a hard requirement for
942
+ # importing yt.testing see https://github.com/yt-project/yt/issues/4507
943
+ import pytest
944
945
def deco(func):
946
missing = [name for name in module_names if find_spec(name) is None]
0 commit comments