Skip to content

Commit 9fcebee

Browse files
Move mark registration (#35146)
1 parent 78de4ce commit 9fcebee

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

pandas/conftest.py

+13
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@
4444
# Configuration / Settings
4545
# ----------------------------------------------------------------
4646
# pytest
47+
def pytest_configure(config):
48+
# Register marks to avoid warnings in pandas.test()
49+
# sync with setup.cfg
50+
config.addinivalue_line("markers", "single: mark a test as single cpu only")
51+
config.addinivalue_line("markers", "slow: mark a test as slow")
52+
config.addinivalue_line("markers", "network: mark a test as network")
53+
config.addinivalue_line(
54+
"markers", "db: tests requiring a database (mysql or postgres)"
55+
)
56+
config.addinivalue_line("markers", "high_memory: mark a test as a high-memory only")
57+
config.addinivalue_line("markers", "clipboard: mark a pd.read_clipboard test")
58+
59+
4760
def pytest_addoption(parser):
4861
parser.addoption("--skip-slow", action="store_true", help="skip slow tests")
4962
parser.addoption("--skip-network", action="store_true", help="skip network tests")

setup.cfg

-7
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ exclude =
5454
# sync minversion with setup.cfg & install.rst
5555
minversion = 4.0.2
5656
testpaths = pandas
57-
markers =
58-
single: mark a test as single cpu only
59-
slow: mark a test as slow
60-
network: mark a test as network
61-
db: tests requiring a database (mysql or postgres)
62-
high_memory: mark a test as a high-memory only
63-
clipboard: mark a pd.read_clipboard test
6457
doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ELLIPSIS
6558
addopts = --strict-data-files
6659
xfail_strict = True

0 commit comments

Comments
 (0)