Skip to content

Commit

Permalink
ci: revert adding duplicate test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonl committed Mar 22, 2021
1 parent 0b2c453 commit e1ee5d5
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions tests/io/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,27 +377,6 @@ def test_to_yaml():
assert yaml_str_schema_method.strip() == YAML_SCHEMA.strip()


@pytest.mark.skipif(
SKIP_YAML_TESTS,
reason="pyyaml >= 5.1.0 required",
)
def test_to_yaml_missing_checks():
"""Test that to_yaml warns when using unregistered checks on columns/globally."""
schema = _create_schema()
unregistered = pa.Check(lambda _: False)
schema.columns["int_column"]._checks.append(unregistered)

with pytest.warns(UserWarning, match=".*registered checks.*"):
io.to_yaml(schema)

del schema.columns["int_column"]._checks[-1]

schema.checks.append(unregistered)

with pytest.warns(UserWarning, match=".*registered checks.*"):
io.to_yaml(schema)


@pytest.mark.skipif(
SKIP_YAML_TESTS,
reason="pyyaml >= 5.1.0 required",
Expand Down Expand Up @@ -578,7 +557,7 @@ def ncols_gt(pandas_obj: pd.DataFrame, column_count: int) -> bool:


def test_to_yaml_custom_dataframe_check():
"""Tests that writing DataFrameSchema with a registered dataframe raises."""
"""Tests that writing DataFrameSchema with an unregistered check raises."""

schema = pa.DataFrameSchema(
{
Expand All @@ -592,6 +571,8 @@ def test_to_yaml_custom_dataframe_check():
with pytest.warns(UserWarning, match=".*registered checks.*"):
pa.io.to_yaml(schema)

# the unregistered column check case is tested in `test_to_yaml_lambda_check`


def test_to_yaml_bugfix_419():
"""Ensure that GH#419 is fixed"""
Expand Down

0 comments on commit e1ee5d5

Please sign in to comment.