Skip to content

Commit cf629d3

Browse files
committed
PKG/DEP: Make importable without pytest
Closes pandas-dev#16065
1 parent 2f9c854 commit cf629d3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pandas/testing.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@
44
Public testing utility functions.
55
"""
66

7-
from pandas.util.testing import (
8-
assert_frame_equal, assert_series_equal, assert_index_equal)
7+
try:
8+
from pandas.util.testing import (
9+
assert_frame_equal, assert_series_equal, assert_index_equal)
10+
except ImportError:
11+
def _f(*args, **kwargs):
12+
raise ImportError("pandas.testing requires pytest. Please "
13+
"`pip install pytest` or `conda install pytest`")
14+
assert_frame_equal = _f
15+
assert_series_equal_equal = _f
16+
assert_index_equal = _f

0 commit comments

Comments
 (0)