From f3f8d4f0961f4dd1fc2d1fa6d51a0074a07db458 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 31 May 2019 17:59:19 +0200 Subject: [PATCH 1/3] prepare conftest for #25637 --- pandas/conftest.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pandas/conftest.py b/pandas/conftest.py index 3c411f8ba3e31..104a57ac49f19 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -376,10 +376,16 @@ def unique_nulls_fixture(request): FixedOffset(0), FixedOffset(-300), timezone.utc, timezone(timedelta(hours=1)), timezone(timedelta(hours=-1), name='foo')] +TIMEZONE_IDS = ['None', 'UTC', 'US/Eastern', 'Asia/Tokyp', + 'dateutil/US/Pacific', 'dateutil/Asia/Singapore', + 'dateutil.tz.tzutz()', 'dateutil.tz.tzlocal()', + 'pytz.FixedOffset(300)', 'pytz.FixedOffset(0)', + 'pytz.FixedOffset(-300)', 'datetime.timezone.utc', + 'datetime.timezone.+1', 'datetime.timezone.-1.named'] -@td.parametrize_fixture_doc(str(TIMEZONES)) -@pytest.fixture(params=TIMEZONES) +@td.parametrize_fixture_doc(str(TIMEZONE_IDS)) +@pytest.fixture(params=TIMEZONES, ids=TIMEZONE_IDS) def tz_naive_fixture(request): """ Fixture for trying timezones including default (None): {0} @@ -387,8 +393,8 @@ def tz_naive_fixture(request): return request.param -@td.parametrize_fixture_doc(str(TIMEZONES[1:])) -@pytest.fixture(params=TIMEZONES[1:]) +@td.parametrize_fixture_doc(str(TIMEZONE_IDS[1:])) +@pytest.fixture(params=TIMEZONES[1:], ids=TIMEZONE_IDS[1:]) def tz_aware_fixture(request): """ Fixture for trying explicit timezones: {0} @@ -409,8 +415,8 @@ def tz_aware_fixture(request): COMPLEX_DTYPES = [complex, "complex64", "complex128"] STRING_DTYPES = [str, 'str', 'U'] -DATETIME_DTYPES = ['datetime64[ns]', 'M8[ns]'] -TIMEDELTA_DTYPES = ['timedelta64[ns]', 'm8[ns]'] +DATETIME64_DTYPES = ['datetime64[ns]', 'M8[ns]'] +TIMEDELTA64_DTYPES = ['timedelta64[ns]', 'm8[ns]'] BOOL_DTYPES = [bool, 'bool'] BYTES_DTYPES = [bytes, 'bytes'] @@ -418,7 +424,7 @@ def tz_aware_fixture(request): ALL_REAL_DTYPES = FLOAT_DTYPES + ALL_INT_DTYPES ALL_NUMPY_DTYPES = (ALL_REAL_DTYPES + COMPLEX_DTYPES + STRING_DTYPES + - DATETIME_DTYPES + TIMEDELTA_DTYPES + BOOL_DTYPES + + DATETIME64_DTYPES + TIMEDELTA64_DTYPES + BOOL_DTYPES + OBJECT_DTYPES + BYTES_DTYPES) From 8be8c00b55b56d4153a3514b417a0f451ab92c21 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 31 May 2019 18:11:23 +0200 Subject: [PATCH 2/3] retrigger azure From 76853702cef6f424ce2019095cdc6f73a3ebc4e5 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 31 May 2019 18:17:21 +0200 Subject: [PATCH 3/3] also include change for clearer separator --- pandas/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/conftest.py b/pandas/conftest.py index 104a57ac49f19..8f71028f51ab4 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -404,6 +404,8 @@ def tz_aware_fixture(request): # ---------------------------------------------------------------- # Dtypes +# ---------------------------------------------------------------- + UNSIGNED_INT_DTYPES = ["uint8", "uint16", "uint32", "uint64"] UNSIGNED_EA_INT_DTYPES = ["UInt8", "UInt16", "UInt32", "UInt64"] SIGNED_INT_DTYPES = [int, "int8", "int16", "int32", "int64"]