Skip to content

Commit 3bb58ac

Browse files
WillAydjreback
authored andcommitted
TST: Parametrized index tests (#20624)
1 parent 0c27f40 commit 3bb58ac

File tree

2 files changed

+272
-274
lines changed

2 files changed

+272
-274
lines changed

pandas/conftest.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

3-
import numpy
4-
import pandas
3+
import numpy as np
4+
import pandas as pd
55
import pandas.util._test_decorators as td
66

77

@@ -36,15 +36,15 @@ def pytest_runtest_setup(item):
3636

3737
@pytest.fixture(autouse=True)
3838
def configure_tests():
39-
pandas.set_option('chained_assignment', 'raise')
39+
pd.set_option('chained_assignment', 'raise')
4040

4141

4242
# For running doctests: make np and pd names available
4343

4444
@pytest.fixture(autouse=True)
4545
def add_imports(doctest_namespace):
46-
doctest_namespace['np'] = numpy
47-
doctest_namespace['pd'] = pandas
46+
doctest_namespace['np'] = np
47+
doctest_namespace['pd'] = pd
4848

4949

5050
@pytest.fixture(params=['bsr', 'coo', 'csc', 'csr', 'dia', 'dok', 'lil'])
@@ -89,6 +89,14 @@ def join_type(request):
8989
return request.param
9090

9191

92+
@pytest.fixture(params=[None, np.nan, pd.NaT, float('nan'), np.float('NaN')])
93+
def nulls_fixture(request):
94+
"""
95+
Fixture for each null type in pandas
96+
"""
97+
return request.param
98+
99+
92100
TIMEZONES = [None, 'UTC', 'US/Eastern', 'Asia/Tokyo', 'dateutil/US/Pacific']
93101

94102

0 commit comments

Comments
 (0)