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

Fix import format at pandas/tests/io/arithmetic directory #24579

Merged
merged 6 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pandas/tests/arithmetic/conftest.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
import pytest

import numpy as np
import pandas as pd
import pytest

from pandas.compat import long
import pandas.util.testing as tm

import pandas as pd
import pandas.util.testing as tm

# ------------------------------------------------------------------
# Helper Functions


def id_func(x):
if isinstance(x, tuple):
assert len(x) == 2
Expand Down
21 changes: 9 additions & 12 deletions pandas/tests/arithmetic/test_datetime64.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@
# Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for datetime64 and datetime64tz dtypes
import operator
from datetime import datetime, timedelta
import warnings
from itertools import product, starmap
import operator
import warnings

import numpy as np
import pytest
import pytz

import pandas as pd
import pandas.util.testing as tm

from pandas.compat.numpy import np_datetime64_compat
from pandas.errors import PerformanceWarning, NullFrequencyError

from pandas._libs.tslibs.conversion import localize_pydatetime
from pandas._libs.tslibs.offsets import shift_months
from pandas.compat.numpy import np_datetime64_compat
from pandas.errors import NullFrequencyError, PerformanceWarning

from pandas.core.indexes.datetimes import _to_M8

import pandas as pd
from pandas import (
Timestamp, Timedelta, Period, Series, date_range, NaT,
DatetimeIndex, TimedeltaIndex)
DatetimeIndex, NaT, Period, Series, Timedelta, TimedeltaIndex, Timestamp,
date_range)
from pandas.core.indexes.datetimes import _to_M8
import pandas.util.testing as tm


def assert_all(obj):
Expand Down
12 changes: 6 additions & 6 deletions pandas/tests/arithmetic/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
from itertools import combinations
import operator

import pytest
import numpy as np

import pandas as pd
import pandas.util.testing as tm
import pytest

from pandas.compat import PY3, Iterable
from pandas.core import ops
from pandas import Timedelta, Series, Index, TimedeltaIndex

import pandas as pd
from pandas import Index, Series, Timedelta, TimedeltaIndex
from pandas.core import ops
import pandas.util.testing as tm

# ------------------------------------------------------------------
# Comparisons


class TestNumericComparisons(object):
def test_operator_series_comparison_zerorank(self):
# GH#13006
Expand Down
9 changes: 4 additions & 5 deletions pandas/tests/arithmetic/test_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
# Specifically for object dtype
import operator

import pytest
import numpy as np
import pytest

import pandas as pd
import pandas.util.testing as tm
from pandas.core import ops

from pandas import Series, Timestamp

from pandas.core import ops
import pandas.util.testing as tm

# ------------------------------------------------------------------
# Comparisons


class TestObjectComparisons(object):

def test_comparison_object_numeric_nas(self):
Expand Down
10 changes: 5 additions & 5 deletions pandas/tests/arithmetic/test_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
import numpy as np
import pytest

import pandas as pd
import pandas.util.testing as tm

from pandas._libs.tslibs.period import IncompatibleFrequency
from pandas.errors import PerformanceWarning

import pandas as pd
from pandas import Period, PeriodIndex, Series, period_range
from pandas.core import ops
from pandas import Period, PeriodIndex, period_range, Series
from pandas.tseries.frequencies import to_offset
import pandas.util.testing as tm

from pandas.tseries.frequencies import to_offset

# ------------------------------------------------------------------
# Comparisons


class TestPeriodIndexComparisons(object):

@pytest.mark.parametrize("other", ["2017", 2017])
Expand Down
13 changes: 6 additions & 7 deletions pandas/tests/arithmetic/test_timedelta64.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
# behave identically.
from datetime import datetime, timedelta

import pytest
import numpy as np

import pandas as pd
import pandas.util.testing as tm
import pytest

from pandas.errors import NullFrequencyError, PerformanceWarning

import pandas as pd
from pandas import (
timedelta_range,
Timedelta, Timestamp, NaT, Series, TimedeltaIndex, DatetimeIndex,
DataFrame)
DataFrame, DatetimeIndex, NaT, Series, Timedelta, TimedeltaIndex,
Timestamp, timedelta_range)
import pandas.util.testing as tm


def get_upcast_box(box, vector):
Expand Down
6 changes: 0 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@ skip=
pandas/tests/api/test_types.py,
pandas/tests/api/test_api.py,
pandas/tests/tools/test_numeric.py,
pandas/tests/arithmetic/test_numeric.py,
pandas/tests/arithmetic/test_object.py,
pandas/tests/arithmetic/test_period.py,
pandas/tests/arithmetic/test_datetime64.py,
pandas/tests/arithmetic/conftest.py,
pandas/tests/arithmetic/test_timedelta64.py,
pandas/tests/internals/test_internals.py,
pandas/tests/plotting/test_datetimelike.py,
pandas/tests/plotting/test_series.py,
Expand Down