Skip to content

TST: run all tests #473

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

Merged
merged 2 commits into from
Dec 19, 2022
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ ci:
autofix_prs: false
repos:
- repo: https://github.com/python/black
rev: 22.8.0
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.11.2
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.0
rev: v3.3.1
hooks:
- id: pyupgrade
types_or: [python, pyi]
types: [text] # overwrite types: [python]
args: [--py38-plus]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
name: flake8 (py)
Expand All @@ -27,7 +27,7 @@ repos:
- id: flake8
name: flake8 (pyi)
additional_dependencies:
- flake8-pyi==22.10.0
- flake8-pyi==22.11.0
types: [pyi]
args: [
--ignore=E301 E302 E305 E402 E501 E701 E704 F401 F811 W503 Y019 Y027 Y034 Y037 Y041 Y042,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ python = ">=3.8,<3.12"
types-pytz = ">= 2022.1.1"

[tool.poetry.dev-dependencies]
mypy = "0.990"
mypy = "0.991"
pyarrow = ">=10.0.1"
pytest = ">=7.1.2"
pyright = "1.1.282"
pyright = ">=1.1.284"
poethepoet = "0.16.0"
loguru = ">=0.6.0"
pandas = "1.5.2"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def test_union_categoricals() -> None:
check(assert_type(api.union_categoricals(to_union), pd.Categorical), pd.Categorical)


def check_extension_dtypes() -> None:
def test_check_extension_dtypes() -> None:
# GH 315
def check_ext_dtype(etype: Type[ExtensionDtype]):
assert issubclass(etype, ExtensionDtype)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2216,13 +2216,13 @@ def f(s: pd.DataFrame) -> pd.Series:
check(assert_type(resampler.apply(f), Union[pd.Series, pd.DataFrame]), pd.DataFrame)


def df_accepting_dicts_iterator() -> None:
def test_df_accepting_dicts_iterator() -> None:
# GH 392
data = [{"a": 1, "b": 2}, {"a": 3, "b": 5}]
check(assert_type(pd.DataFrame(iter(data)), pd.DataFrame), pd.DataFrame)


def series_added_in_astype() -> None:
def test_series_added_in_astype() -> None:
# GH410
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
check(assert_type(df.astype(df.dtypes), pd.DataFrame), pd.DataFrame)
Expand Down
12 changes: 5 additions & 7 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def test_types_read_table():
df2: pd.DataFrame = pd.read_table(path, sep=",", converters=None)


def btest_read_fwf():
def test_btest_read_fwf():
with ensure_clean() as path:
DF.to_string(path, index=False)
check(assert_type(read_fwf(path), DataFrame), DataFrame)
Expand All @@ -555,12 +555,10 @@ def btest_read_fwf():
with open(path, "rb") as fwf_file:
bio = io.BytesIO(fwf_file.read())
check(assert_type(read_fwf(bio), DataFrame), DataFrame)
fwf_iterator = read_fwf(path, iterator=True)
check(assert_type(fwf_iterator, TextFileReader), TextFileReader)
fwf_iterator.close()
fwf_iterator2 = read_fwf(path, chunksize=1)
check(assert_type(fwf_iterator2, TextFileReader), TextFileReader)
fwf_iterator.close()
with read_fwf(path, iterator=True) as fwf_iterator:
check(assert_type(fwf_iterator, TextFileReader), TextFileReader)
with read_fwf(path, chunksize=1) as fwf_iterator2:
check(assert_type(fwf_iterator2, TextFileReader), TextFileReader)


def test_text_file_reader():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_timefuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def test_iso_calendar() -> None:
dates.isocalendar()


def fail_on_adding_two_timestamps() -> None:
def test_fail_on_adding_two_timestamps() -> None:
s1 = pd.Series(pd.to_datetime(["2022-05-01", "2022-06-01"]))
s2 = pd.Series(pd.to_datetime(["2022-05-15", "2022-06-15"]))
if TYPE_CHECKING_INVALID_USAGE:
Expand Down