Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Parametrized index tests #20624

Merged
merged 13 commits into from
Apr 24, 2018
18 changes: 13 additions & 5 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

import numpy
import pandas
import numpy as np
import pandas as pd
import pandas.util._test_decorators as td


Expand Down Expand Up @@ -36,15 +36,15 @@ def pytest_runtest_setup(item):

@pytest.fixture(autouse=True)
def configure_tests():
pandas.set_option('chained_assignment', 'raise')
pd.set_option('chained_assignment', 'raise')


# For running doctests: make np and pd names available

@pytest.fixture(autouse=True)
def add_imports(doctest_namespace):
doctest_namespace['np'] = numpy
doctest_namespace['pd'] = pandas
doctest_namespace['np'] = np
doctest_namespace['pd'] = pd


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


@pytest.fixture(params=[None, np.nan, pd.NaT, float('nan'), np.float('NaN')])
def nulls_fixture(request):
"""
Fixture for each null type in pandas
"""
return request.param


TIMEZONES = [None, 'UTC', 'US/Eastern', 'Asia/Tokyo', 'dateutil/US/Pacific']


Expand Down
Loading