Skip to content

Commit

Permalink
Fix pylint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Baden Ashford <[email protected]>
  • Loading branch information
kykyi committed Jan 22, 2024
1 parent 148aed6 commit 938693d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/core/test_error_formatters.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
"""Test the error message produced from validating an invalid dataframe is correctly formatted`"""

import pytest
import pandas as pd

from pandera.api.checks import Check
from pandera.api.pandas.components import Column
from pandera.api.pandas.container import DataFrameSchema
import pytest
from pandera.errors import SchemaErrors
import pandas as pd


def custom_wide_check(df):
def _mock_custom_wide_check(df):
"""Mock check function for us in the spec below"""
return (df["column_1"] + df["column_2"] >= df["column_3"]).all()


Expand Down Expand Up @@ -66,7 +70,7 @@ def custom_wide_check(df):
},
name="Wide Schema",
strict=True,
checks=[Check(custom_wide_check)],
checks=[Check(_mock_custom_wide_check)],
),
pd.DataFrame(
{
Expand All @@ -87,7 +91,7 @@ def custom_wide_check(df):
],
)
def test_schema_error_messages(schema, df, error_message):
"""Test the error message produced from validating an invalid dataframe is correctly formatted`"""
"""Test the SchemaErrors message produced by schema validation"""
with pytest.raises(SchemaErrors) as e:
schema.validate(df, lazy=True)

Expand Down

0 comments on commit 938693d

Please sign in to comment.