Skip to content

Commit 52e9b11

Browse files
datapythonistajreback
authored andcommitted
TST: Fixing bug in skipping db tests by default (#24513)
1 parent 592eb5e commit 52e9b11

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/conftest.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ def pytest_runtest_setup(item):
6161
"skipping high memory test since --run-high-memory was not set")
6262

6363
# if "db" not explicitly set in the -m pattern, we skip the db tests
64-
if 'db' in item.keywords:
65-
pattern = item.config.getoption('-m')
64+
pattern = item.config.getoption('-m')
65+
if 'db' in item.keywords and not pattern:
66+
pytest.skip('skipping db unless -m "db" is specified')
67+
elif 'db' in item.keywords and pattern:
6668
markers = collections.defaultdict(bool)
6769
for marker in item.iter_markers():
6870
markers[marker.name] = True

0 commit comments

Comments
 (0)