repo_id stringclasses 400
values | cross_repo_split stringclasses 1
value | commit_index int32 0 1.19k | commit_sha stringlengths 40 40 | in_repo_split stringclasses 3
values | test_file stringlengths 7 121 | file_split stringclasses 3
values | split_group stringlengths 18 150 | lineno int32 1 5.24k | col_offset int32 0 165 | assertion_type stringclasses 35
values | test_function stringlengths 0 141 | prefix large_stringlengths 7 258k | target stringlengths 1 29.2k | assertion_event_type stringclasses 2
values | assertion_event_id stringlengths 64 64 | assertion_anchor large_stringlengths 14 176k | old_target stringlengths 1 11.2k ⌀ | old_lineno int32 2 4.91k ⌀ | old_col_offset int32 0 165 ⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
unionai-oss/pandera | train | 300 | c815a6df5c97af4cbfa0bcd40757bc6d9ffa8549 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 730 | 4 | assert | test_is_binary | """Tests a variety of python and pandas dtypes, and tests some specific
coercion examples."""
# pylint doesn't know about __init__ generated with dataclass
# pylint:disable=unexpected-keyword-arg,no-value-for-parameter
# pylint:disable=unsubscriptable-object
import dataclasses
import datetime
import inspect
import re
... | pa.dtypes.is_binary(pa.dtypes.Binary) | added | efe5f4bb56b69ecaedaae1fec1573db3e821151878c0ec6376e5544c7af6ff6c | assert|test_is_binary|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import dataclasses import datetime impo... | null | null | null |
unionai-oss/pandera | train | 300 | c815a6df5c97af4cbfa0bcd40757bc6d9ffa8549 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 913 | 8 | assert | test_python_std_list_dict_empty_and_none | """Tests a variety of python and pandas dtypes, and tests some specific
coercion examples."""
# pylint doesn't know about __init__ generated with dataclass
# pylint:disable=unexpected-keyword-arg,no-value-for-parameter
# pylint:disable=unsubscriptable-object
import dataclasses
import datetime
import inspect
import re
... | schema.validate(data).equals(expected) | added | 6c58439f7377dd37b27218ec5fa01666cfaa0bf07f92fca2bcf28b807e93d41e | assert|test_python_std_list_dict_empty_and_none|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import datacl... | null | null | null |
unionai-oss/pandera | train | 301 | 47c236ed9e71a8f11a155b21e3052cd1772c6c66 | train | tests/core/test_logical_dtypes.py | train | unionai-oss/pandera:tests/core/test_logical_dtypes.py | 164 | 8 | assert_* | test_logical_datatype_coerce | """Tests logical dtypes."""
from datetime import date, datetime
from decimal import Decimal
from types import ModuleType
from typing import Any, Generator, Iterable, List, cast
import numpy as np
import pandas as pd
import pytest
from pandas.testing import assert_series_equal
import pandera as pa
from pandera.engine... | actual_failure_cases) | added | bea116297c3b95052f0762c9aaeab52b46c48c15c8a11cf90605364786bf2b60 | assert_*|test_logical_datatype_coerce|"""Tests logical dtypes.""" from datetime import date, datetime from decimal import Decimal from types import ModuleType from typing import Any, Generator, Iterable, List, cast import numpy as np import pandas as pd import pytest from pandas.testing import assert_series_equal impor... | null | null | null |
unionai-oss/pandera | train | 301 | 47c236ed9e71a8f11a155b21e3052cd1772c6c66 | train | tests/core/test_logical_dtypes.py | train | unionai-oss/pandera:tests/core/test_logical_dtypes.py | 220 | 8 | assert | test_logical_datatype_coerce_value | """Tests logical dtypes."""
from datetime import date, datetime
from decimal import Decimal
from types import ModuleType
from typing import Any, Generator, Iterable, List, cast
import numpy as np
import pandas as pd
import pytest
from pandas.testing import assert_series_equal
import pandera as pa
from pandera.engine... | pd.isna(coerced_value) | added | d986607694725a643d41a2d66c641007e80913caae940de9b31c5dfa93dfc180 | assert|test_logical_datatype_coerce_value|"""Tests logical dtypes.""" from datetime import date, datetime from decimal import Decimal from types import ModuleType from typing import Any, Generator, Iterable, List, cast import numpy as np import pandas as pd import pytest from pandas.testing import assert_series_equal i... | null | null | null |
unionai-oss/pandera | train | 301 | 47c236ed9e71a8f11a155b21e3052cd1772c6c66 | train | tests/core/test_logical_dtypes.py | train | unionai-oss/pandera:tests/core/test_logical_dtypes.py | 228 | 9 | pytest.raises | test_invalid_decimal_params | """Tests logical dtypes."""
from datetime import date, datetime
from decimal import Decimal
from types import ModuleType
from typing import Any, Generator, Iterable, List, cast
import numpy as np
import pandas as pd
import pytest
from pandas.testing import assert_series_equal
import pandera as pa
from pandera.engine... | ValueError) | added | ca534abb554979bde56345f904249cad305a18fae1307e0d103ac92424b001fb | pytest.raises|test_invalid_decimal_params|"""Tests logical dtypes.""" from datetime import date, datetime from decimal import Decimal from types import ModuleType from typing import Any, Generator, Iterable, List, cast import numpy as np import pandas as pd import pytest from pandas.testing import assert_series_equal i... | null | null | null |
unionai-oss/pandera | train | 301 | 47c236ed9e71a8f11a155b21e3052cd1772c6c66 | train | tests/core/test_logical_dtypes.py | train | unionai-oss/pandera:tests/core/test_logical_dtypes.py | 279 | 4 | assert | test_decimal_scale_zero_missing_violation | """Tests logical dtypes."""
from datetime import date, datetime
from decimal import Decimal
from types import ModuleType
from typing import Any, Generator, Iterable, List, cast
import numpy as np
import pandas as pd
import pytest
from pandas.testing import assert_series_equal
import pandera as pa
from pandera.engine... | bool | added | b5b9b9a1b6a1ea4f1b4c0511621975545001c3471093b7603e68689fc6b486bd | assert|test_decimal_scale_zero_missing_violation|"""Tests logical dtypes.""" from datetime import date, datetime from decimal import Decimal from types import ModuleType from typing import Any, Generator, Iterable, List, cast import numpy as np import pandas as pd import pytest from pandas.testing import assert_series_... | null | null | null |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,450 | 8 | assert | test_lazy_dataframe_validation_with_checks | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | ["YES", "YES", "NO", "NO"] | modified | ba329944de463cfe627138ab59289321afa41ac67c1cde48bf3e12d077180c45 | assert|test_lazy_dataframe_validation_with_checks|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Union ... | ["YES", "YES", "NO", "NO"] | 1,450 | 8 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,772 | 8 | assert | test_schema_coerce_inplace_validation | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | to_dtype | modified | 43b988e63dbf02278bac0799d4bc3d33acd1c468c401643bbc836317587ed195 | assert|test_schema_coerce_inplace_validation|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Union impor... | to_dtype | 1,772 | 8 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 566 | 13 | pytest.raises | test_dataframe_schema_with_tz_agnostic_dates | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | pa.errors.SchemaError) | modified | e9fc82dae44f93aa78bc6147257d69c0fbbca96ed9091f3320f436b518580a0b | pytest.raises|test_dataframe_schema_with_tz_agnostic_dates|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from p... | pa.errors.SchemaError) | 565 | 13 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 589 | 8 | assert | test_dataframe_coerce_col_with_null_in_other_column | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | [ {"failure_case": "abc"}, {"failure_case": "String"}, ] | modified | 90d62b08f9308b00cc8b5e972cb3cda381de95d4b89cfc89ef10755236f531f9 | assert|test_dataframe_coerce_col_with_null_in_other_column|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from p... | [ {"failure_case": "abc"}, {"failure_case": "String"}, ] | 588 | 8 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 101 | 8 | assert | test_coerce_no_cast_special | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | to_dtype.type | modified | 110d8677c62bdbe8888014aaeabb8d4cc26853bacf9f2d2ce7d060add6b75918 | assert|test_coerce_no_cast_special|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_equal... | to_dtype.type | 99 | 8 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 149 | 12 | assert | test_coerce_cast_special | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | pl.Float64 | modified | b3bbefe8974a47bc54d21ca2c130342445531649eb41c02a7e8b8e1c6d4d8221 | assert|test_coerce_cast_special|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_equal fr... | pl.Float64 | 147 | 12 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 338 | 4 | assert | test_polars_struct_nested_type | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | not pandera_dtype.check(inner_dtype_cls()) | modified | 59e657049226618e10d93563212e9127182e5db36adc13d001e5a4dab01b5e95 | assert|test_polars_struct_nested_type|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_eq... | not pandera_dtype.check(inner_dtype_cls()) | 336 | 4 |
unionai-oss/pandera | train | 302 | 7a065a9ae495d58ddcca12f10ffa46009793c902 | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 272 | 17 | pytest.raises | test_dataframe_schema_with_tz_agnostic_dates | """Unit tests for polars dataframe model."""
import sys
from typing import Optional
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
from hypothesis import given
from hypothesis impor... | SchemaError) | modified | 25e25ded48366c8d1370084b969a826e41d234fb56411df21fece635eea6e81c | pytest.raises|test_dataframe_schema_with_tz_agnostic_dates|"""Unit tests for polars dataframe model.""" import sys from typing import Optional try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest from ... | SchemaError) | 271 | 17 |
unionai-oss/pandera | train | 303 | e49c4af3f0096e61913bf28f44f31860a6d3ef31 | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 53 | 4 | assert | test_column_coerce | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | isinstance(validated, pd.DataFrame) | modified | de3566a166ea2af6163f232a6d4258907c90b9b5062a9ea3ce83f53fbc3f7192 | assert|test_column_coerce|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSchema, String, errors, ... | isinstance(validated, pd.DataFrame) | 52 | 4 |
unionai-oss/pandera | train | 303 | e49c4af3f0096e61913bf28f44f31860a6d3ef31 | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 128 | 4 | assert | test_multi_index_columns | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | isinstance(validated_df, pd.DataFrame) | modified | 96a1b3d6730426505f72e007808d021759efae963ba01d2c81193b299f0e483e | assert|test_multi_index_columns|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSchema, String, er... | isinstance(validated_df, pd.DataFrame) | 127 | 4 |
unionai-oss/pandera | train | 303 | e49c4af3f0096e61913bf28f44f31860a6d3ef31 | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 549 | 4 | assert | test_column_regex_matching_non_str_types_multiindex | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | [*matched_columns] | modified | d81b08b73c585d363675edc7799d1d67d4b345b9c293ab86d8f625dc91ddf0ac | assert|test_column_regex_matching_non_str_types_multiindex|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiInde... | [*matched_columns] | 548 | 4 |
unionai-oss/pandera | train | 303 | e49c4af3f0096e61913bf28f44f31860a6d3ef31 | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 599 | 4 | assert | test_column_regex_non_str_types | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | isinstance(schema.validate(data), pd.DataFrame) | modified | 56edd41b97e0756b3584c669b464935343ec384d04457b20e3073625c1318f88 | assert|test_column_regex_non_str_types|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSchema, Str... | isinstance(schema.validate(data), pd.DataFrame) | 598 | 4 |
unionai-oss/pandera | train | 303 | e49c4af3f0096e61913bf28f44f31860a6d3ef31 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 2,650 | 4 | assert | test_schema_column_default_handle_nans | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | default | added | f6e1c9c8eab4d974d85cfd2ef3c72edd1ff99a7e5ad75214bff013247b3d5cd9 | assert|test_schema_column_default_handle_nans|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Union impo... | null | null | null |
unionai-oss/pandera | train | 304 | 39b1cf5d09d89085e5cdaf7af206ad2bc9c627f4 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 421 | 9 | pytest.raises | test_check_non_existing | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
import p... | pa.errors.SchemaInitError, match=err_msg) | added | f3be24b9980c60a65a261bad452b18e85518686d940dbdbdd1ce2270039eade0 | pytest.raises|test_check_non_existing|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, Optional, TypeVar import pandas as pd import p... | null | null | null |
unionai-oss/pandera | train | 304 | 39b1cf5d09d89085e5cdaf7af206ad2bc9c627f4 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 468 | 9 | pytest.raises | test_check_multiple_columns | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
import p... | pa.errors.SchemaErrors) | added | d643e9a171e9f99f4f41f702906cc67078cadef97694d5e85ae4a69c97a11f57 | pytest.raises|test_check_multiple_columns|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, Optional, TypeVar import pandas as pd impo... | null | null | null |
unionai-oss/pandera | train | 304 | 39b1cf5d09d89085e5cdaf7af206ad2bc9c627f4 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 699 | 4 | assert | test_registered_dataframe_checks | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
import p... | expected_stats_child | added | c8dc662484a0fec2c67682cd6e1b6cac862d9458261bc612056145256c1661d7 | assert|test_registered_dataframe_checks|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, Optional, TypeVar import pandas as pd import... | null | null | null |
unionai-oss/pandera | train | 304 | 39b1cf5d09d89085e5cdaf7af206ad2bc9c627f4 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,257 | 9 | pytest.raises | test_generic_optional_field | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
import p... | SchemaError) | added | 76e79e0fadda6c0d571aeb0a7ac1d126d358310cdbfc8d21881734dd8f4d086f | pytest.raises|test_generic_optional_field|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, Optional, TypeVar import pandas as pd impo... | null | null | null |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/core/test_pandas_engine.py | test | unionai-oss/pandera:tests/core/test_pandas_engine.py | 98 | 4 | assert | test_pandas_data_type_check | """Test pandas engine."""
from datetime import date
from typing import Any, Set
import hypothesis
import hypothesis.extra.pandas as pd_st
import hypothesis.strategies as st
import numpy as np
import pandas as pd
import pyarrow
import pytest
import pytz
from hypothesis import given
from pandera.engines import pandas_... | isinstance(check_result, bool) or isinstance( check_result.all(), (bool, np.bool_), ) | modified | a1bdc0ab59f0db961773d80dd2a3f2d9cc272f8e4aa7ecb2329764411efd58e9 | assert|test_pandas_data_type_check|"""Test pandas engine.""" from datetime import date from typing import Any, Set import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pyarrow import pytest import pytz from hypothesis import given fro... | isinstance(check_result, bool) or isinstance( check_result.all(), (bool, np.bool_), ) | 97 | 4 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/core/test_pandas_engine.py | test | unionai-oss/pandera:tests/core/test_pandas_engine.py | 117 | 8 | assert | test_pandas_category_dtype | """Test pandas engine."""
from datetime import date
from typing import Any, Set
import hypothesis
import hypothesis.extra.pandas as pd_st
import hypothesis.strategies as st
import numpy as np
import pandas as pd
import pyarrow
import pytest
import pytz
from hypothesis import given
from pandera.engines import pandas_... | CATEGORIES | modified | 593038d51c1b3ac8d0d820dbf122d253804f1872bfed7bb950aced6bd2587da1 | assert|test_pandas_category_dtype|"""Test pandas engine.""" from datetime import date from typing import Any, Set import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pyarrow import pytest import pytz from hypothesis import given from... | CATEGORIES | 116 | 8 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/core/test_pandas_engine.py | test | unionai-oss/pandera:tests/core/test_pandas_engine.py | 142 | 13 | pytest.raises | test_pandas_boolean_native_type | """Test pandas engine."""
from datetime import date
from typing import Any, Set
import hypothesis
import hypothesis.extra.pandas as pd_st
import hypothesis.strategies as st
import numpy as np
import pandas as pd
import pyarrow
import pytest
import pytz
from hypothesis import given
from pandera.engines import pandas_... | TypeError) | modified | ee6c05f1e6397c17e789334ae9719e99ae3327f65bf00eaf95152ef98e0147e3 | pytest.raises|test_pandas_boolean_native_type|"""Test pandas engine.""" from datetime import date from typing import Any, Set import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pyarrow import pytest import pytz from hypothesis impor... | TypeError) | 141 | 13 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/core/test_pandas_engine.py | test | unionai-oss/pandera:tests/core/test_pandas_engine.py | 204 | 8 | assert | test_pandas_datetimetz_dtype | """Test pandas engine."""
from datetime import date
from typing import Any, Set
import hypothesis
import hypothesis.extra.pandas as pd_st
import hypothesis.strategies as st
import numpy as np
import pandas as pd
import pyarrow
import pytest
import pytz
from hypothesis import given
from pandera.engines import pandas_... | timezone | modified | ec4e96e8973a9ae5ce4b504b3980d51cd2daee37bf25d9cf8901db716967e530 | assert|test_pandas_datetimetz_dtype|"""Test pandas engine.""" from datetime import date from typing import Any, Set import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pyarrow import pytest import pytz from hypothesis import given fr... | timezone | 203 | 8 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 313 | 4 | assert | test_isin_notin_strategies | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | values | modified | 28b108db5d2d44fb4fc261fd2f665f509b2b056b4131d3452a972cc17fcd9a91 | assert|test_isin_notin_strategies|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock imp... | values | 311 | 4 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 361 | 4 | assert | test_str_pattern_checks | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | re.search(pattern, example) | modified | 8b832bb5d947f20da9a2e7ad9d3c3e814d94418f0d262bc7ee43803174ed265b | assert|test_str_pattern_checks|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock import... | re.search(pattern, example) | 359 | 4 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 664 | 8 | assert | test_multiindex_strategy | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | data_type.check(actual_data_type) | modified | 4cef89cfb4b009be87ebfee2c44d14b1eb3789ada3c8170f4a2fb10973d637e3 | assert|test_multiindex_strategy|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock impor... | data_type.check(actual_data_type) | 662 | 8 |
unionai-oss/pandera | train | 305 | 44a976320945cc8b821f2e566baa85cdfd43231c | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 754 | 8 | assert | test_check_nullable_dataframe_strategy | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | example.notna().all(axis=None) | modified | 3ca494d0d3ff0cc5f9efd71cbd273655a8c994c433004a2bc89b5645b7833db0 | assert|test_check_nullable_dataframe_strategy|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unitt... | example.notna().all(axis=None) | 752 | 8 |
unionai-oss/pandera | train | 306 | 3ffacc89fc0a0aa61f690e4aa47b7286f7cb0fc7 | train | tests/core/test_pandas_engine.py | test | unionai-oss/pandera:tests/core/test_pandas_engine.py | 344 | 9 | pytest.raises | test_pandas_arrow_dtype_error | """Test pandas engine."""
from datetime import date
from typing import Any, Set
import hypothesis
import hypothesis.extra.pandas as pd_st
import hypothesis.strategies as st
import numpy as np
import pandas as pd
import pyarrow
import pytest
import pytz
from hypothesis import given
from pandera.engines import pandas_... | ( pyarrow.ArrowInvalid, pyarrow.ArrowTypeError, NotImplementedError, ValueError, )) | added | 5dc3eb9e306c0b8a8fb8ff8e109b7e03f96297e764af50075c40a07d93fb66ba | pytest.raises|test_pandas_arrow_dtype_error|"""Test pandas engine.""" from datetime import date from typing import Any, Set import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pyarrow import pytest import pytz from hypothesis import ... | null | null | null |
unionai-oss/pandera | train | 306 | 3ffacc89fc0a0aa61f690e4aa47b7286f7cb0fc7 | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 599 | 8 | assert | test_dataframe_with_regex | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | n_regex_columns | added | 0acaeca3b8c55d33b725226152727abe8194b81dc7394cdd328ad52c2b34feb7 | assert|test_dataframe_with_regex|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock impo... | null | null | null |
unionai-oss/pandera | train | 306 | 3ffacc89fc0a0aa61f690e4aa47b7286f7cb0fc7 | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 747 | 8 | assert | test_check_nullable_field_strategy | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | example.notna().all() | added | e241f42c54240b32968315afe9c9aab82aa64bf23a41a7cb4a41560bb4a4368f | assert|test_check_nullable_field_strategy|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.... | null | null | null |
unionai-oss/pandera | train | 306 | 3ffacc89fc0a0aa61f690e4aa47b7286f7cb0fc7 | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 765 | 8 | assert | test_check_nullable_dataframe_strategy | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | example.notna().all(axis=None) | added | a0ac09550f731801a7bec2a4b9297d213838f3b4e83975c4bbd5134c3757a051 | assert|test_check_nullable_dataframe_strategy|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unitt... | null | null | null |
unionai-oss/pandera | train | 306 | 3ffacc89fc0a0aa61f690e4aa47b7286f7cb0fc7 | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 956 | 13 | pytest.raises | test_unsatisfiable_checks | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | hypothesis.errors.Unsatisfiable) | added | 532740a19d84e863a71ef9c8184ce5fcf1fc5f4c504a0588378212d1c09e4693 | pytest.raises|test_unsatisfiable_checks|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mo... | null | null | null |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 85 | 8 | assert | test_lazyframe_validation_depth_none | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.base.error_handler import ErrorCategory
from pandera.config import (
CON... | exc.message | modified | 91ff7fd46a022fe22ee1b18a2bec830914797f6744beb952221b00992af03a45 | assert|test_lazyframe_validation_depth_none|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.base.error_handler import ErrorCat... | exc.message | 84 | 8 |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 137 | 4 | assert | test_lazyframe_validation_depth_schema_and_data | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.base.error_handler import ErrorCategory
from pandera.config import (
CON... | valid.pipe(schema.validate).collect().equals(valid.collect()) | modified | 1fc4f590ddfd64e6617d9878f11d05729b6d99422e637c056f5d9ac36c358f05 | assert|test_lazyframe_validation_depth_schema_and_data|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.base.error_handler impo... | valid.pipe(schema.validate).collect().equals(valid.collect()) | 136 | 4 |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 160 | 4 | assert | test_coerce_validation_depth_none | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.base.error_handler import ErrorCategory
from pandera.config import (
CON... | pl.Int64 | modified | e382e954fc079619402d78c85c64321a0af79b2216fdd33a63bd58bcfc67e6de | assert|test_coerce_validation_depth_none|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.base.error_handler import ErrorCatego... | pl.Int64 | 159 | 4 |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 193 | 9 | pytest.raises | test_coerce_cast_failed | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | exception_cls) | added | 62e846d5c0055c8e587aa64dbb97dadcb4c4f6c5b1c1f5e5be4ba5753918deb4 | pytest.raises|test_coerce_cast_failed|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_eq... | null | null | null |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 425 | 8 | assert | test_polars_nested_dtypes_try_coercion | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | exc.failure_cases.select(col).equals(data.collect()) | added | 76158eb95c9e001589108d4d14a1393bf227bcc4ed6b6df36b6ced48283aadee | assert|test_polars_nested_dtypes_try_coercion|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_... | null | null | null |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 154 | 4 | assert | test_basic_model | """Unit tests for polars dataframe model."""
import sys
from typing import Optional
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
from hypothesis import given
from hypothesis impor... | isinstance(query, pl.LazyFrame) | added | 54e5f8123e830fe1f27a193995ee9a572694733569f9570cf841274fb7ba8aab | assert|test_basic_model|"""Unit tests for polars dataframe model.""" import sys from typing import Optional try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest from hypothesis import given from hypoth... | null | null | null |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 229 | 4 | assert | test_polars_python_list_df_model | """Unit tests for polars dataframe model."""
import sys
from typing import Optional
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
from hypothesis import given
from hypothesis impor... | schema | added | ca0854b494d3a93bcf15a94731375d103a1e2ceebc6a74c81414fee30c3145ba | assert|test_polars_python_list_df_model|"""Unit tests for polars dataframe model.""" import sys from typing import Optional try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest from hypothesis import g... | null | null | null |
unionai-oss/pandera | train | 307 | 5872325e21d30c9f80821b33bff0d676cb6de36b | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 279 | 17 | pytest.raises | test_dataframe_schema_with_tz_agnostic_dates | """Unit tests for polars dataframe model."""
import sys
from typing import Optional
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
from hypothesis import given
from hypothesis impor... | SchemaError) | added | 63579f9ab2fbab9e3534ed7849d260544bb7fc6828f0575d2fe3843423bad171 | pytest.raises|test_dataframe_schema_with_tz_agnostic_dates|"""Unit tests for polars dataframe model.""" import sys from typing import Optional try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest from ... | null | null | null |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 116 | 4 | assert | test_polars_dataframe_check | """Unit tests for polars check class."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.constants import CHECK_OUTPUT_KEY
@pytest.fixture
def column_lf():
return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)})
@pyt... | expected_output | modified | 10f97db6d12d71ef8e9fadfba2f3e312b942b3785098e7604d7b8032d45db0fe | assert|test_polars_dataframe_check|"""Unit tests for polars check class.""" import polars as pl import pytest import pandera.polars as pa from pandera.api.polars.utils import get_lazyframe_schema from pandera.constants import CHECK_OUTPUT_KEY @pytest.fixture def column_lf(): return pl.LazyFrame({"col": pl.Series([1, 2,... | expected_output | 115 | 4 |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_components.py | train | unionai-oss/pandera:tests/polars/test_polars_components.py | 148 | 8 | assert | test_check_nullable | """Unit tests for polars components."""
from typing import Iterable, List, Optional, Union
import polars as pl
import pytest
import pandera.polars as pa
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.backends.base import CoreCheckResult
from pandera.backends.polars.components import ColumnBac... | result.passed if nullable else not result.passed | modified | 35e613b401d78269949ea507dfe91ee3e5112b32f31038b413637c55add45bbd | assert|test_check_nullable|"""Unit tests for polars components.""" from typing import Iterable, List, Optional, Union import polars as pl import pytest import pandera.polars as pa from pandera.api.polars.utils import get_lazyframe_schema from pandera.backends.base import CoreCheckResult from pandera.backends.polars.com... | result.passed if nullable else not result.passed | 147 | 8 |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 86 | 8 | assert | test_lazyframe_validation_depth_none | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.api.base.error_handler... | exc.message | modified | c12f423b170d46def8e7ee055282d17cb95c464d775e6a043da09f9cef8957db | assert|test_lazyframe_validation_depth_none|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.polars.utils import get_lazyframe_... | exc.message | 85 | 8 |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 173 | 8 | assert | test_coerce_validation_depth_none | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.api.base.error_handler... | ValidationDepth.SCHEMA_AND_DATA | modified | f8372a7b299261fc0cc03a0a1db71de525e9d393f92d500814365ff3705570cb | assert|test_coerce_validation_depth_none|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.polars.utils import get_lazyframe_sch... | ValidationDepth.SCHEMA_AND_DATA | 172 | 8 |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 204 | 4 | assert | test_add_missing_columns_with_default | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | validated_data.collect().equals( ldf_basic.with_columns(int_col=pl.lit(1)).collect() ) | modified | cb0ce9a9da7830dfb48693a57eb1db90ab163ef6b0b545135399cd1d00cac36f | assert|test_add_missing_columns_with_default|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from polars.testing.... | validated_data.collect().equals( ldf_basic.with_columns(int_col=pl.lit(1)).collect() ) | 203 | 4 |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 279 | 4 | assert | test_check_equivalent_custom | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | equivalent | added | d93c7cf66e8755ae9f8c37fe9d802facdc6e287dc537a8319765f30e9e55f967 | assert|test_check_equivalent_custom|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_equa... | null | null | null |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 373 | 4 | assert | test_polars_struct_nested_type | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | pandera_dtype.check(pandera_dtype) | added | 3e2e0063fc356bff799b4569fce08b50c9763ceaa799ba910b19309600047ee9 | assert|test_polars_struct_nested_type|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_eq... | null | null | null |
unionai-oss/pandera | train | 308 | b8604b36f80d0add5ef8e8c20a7cb4731211b898 | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 280 | 17 | pytest.raises | test_dataframe_schema_with_tz_agnostic_dates | """Unit tests for polars dataframe model."""
import sys
from typing import Optional
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
from hypothesis import given
from hypothesis impor... | SchemaError) | modified | 41a954705d74dc0789a2dea367049a7fbdafacf8bbb100ef256cd5b8dc7542dd | pytest.raises|test_dataframe_schema_with_tz_agnostic_dates|"""Unit tests for polars dataframe model.""" import sys from typing import Optional try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest from ... | SchemaError) | 279 | 17 |
unionai-oss/pandera | train | 309 | 44f64629f56bb7a674029b07cd5ded36b95dcf61 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 278 | 9 | pytest.raises | test_column_values_are_unique | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | pa.errors.SchemaError) | added | b795901faf61fe2df39861a4a4e3940dbef76722d8ffded1948e0cd9a90da5a8 | pytest.raises|test_column_values_are_unique|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from polars.testing.p... | null | null | null |
unionai-oss/pandera | train | 309 | 44f64629f56bb7a674029b07cd5ded36b95dcf61 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 438 | 9 | pytest.raises | test_ordered | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | pa.errors.SchemaError) | added | c6a0554c55b9cac2f1cea4110bfc1ad8e9740385a685dfbdff04b88fc5f09eb4 | pytest.raises|test_ordered|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from polars.testing.parametric import ... | null | null | null |
unionai-oss/pandera | train | 309 | 44f64629f56bb7a674029b07cd5ded36b95dcf61 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 528 | 4 | assert | test_dataframe_schema_with_nested_types | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | validated_lf.collect().equals(lf_with_nested_types.collect()) | added | 9d4e5fcdc599081ce461c94d023d47f92d2334ccaad8c41dab0b50a3e088024e | assert|test_dataframe_schema_with_nested_types|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from polars.testin... | null | null | null |
unionai-oss/pandera | train | 309 | 44f64629f56bb7a674029b07cd5ded36b95dcf61 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 541 | 4 | assert | test_dataframe_model_with_annotated_nested_types | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
from hypothesis import given
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric import column, dataframes
impor... | validated_lf.collect().equals(validated_lf.collect()) | added | 24bb184de9fa3bf488bc7c8f9d4d4afd261f041521bb39678f95887375abf2a1 | assert|test_dataframe_model_with_annotated_nested_types|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest from hypothesis import given from hypothesis import strategies as st from polars.testing import assert_frame_equal from pola... | null | null | null |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 620 | 4 | assert | test_is_int | """Tests a variety of python and pandas dtypes, and tests some specific
coercion examples."""
# pylint doesn't know about __init__ generated with dataclass
# pylint:disable=unexpected-keyword-arg,no-value-for-parameter
# pylint:disable=unsubscriptable-object
import dataclasses
import datetime
import inspect
import re
... | expected | modified | aad310bdcfaa39df77b2cc186a484ae1f0b16b02e8af77d90b1d554f5989f111 | assert|test_is_int|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import dataclasses import datetime import ... | expected | 620 | 4 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 715 | 4 | assert | test_pandera_timedelta_dtype | """Tests a variety of python and pandas dtypes, and tests some specific
coercion examples."""
# pylint doesn't know about __init__ generated with dataclass
# pylint:disable=unexpected-keyword-arg,no-value-for-parameter
# pylint:disable=unsubscriptable-object
import dataclasses
import datetime
import inspect
import re
... | "timedelta" | modified | 8deb83580575c2dc7765dda695189db87a58280a6853775bee0d08a38e4f1137 | assert|test_pandera_timedelta_dtype|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import dataclasses import... | "timedelta" | 715 | 4 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/geopandas/test_engine.py | test | unionai-oss/pandera:tests/geopandas/test_engine.py | 31 | 9 | pytest.raises | test_engine_geometry_equality | """Unit tests for the geopandas engine dtype Geometry."""
import geopandas as gpd
import numpy as np
import pandas as pd
import pytest
import shapely
from shapely.geometry import Point
import pandera as pa
from pandera.engines.pandas_engine import DateTime
from pandera.engines.geopandas_engine import Geometry
def t... | TypeError) | modified | e81daf0c6df7503897be39313882d5e62146b20929a18bba5aa6b0f6dec235b8 | pytest.raises|test_engine_geometry_equality|"""Unit tests for the geopandas engine dtype Geometry.""" import geopandas as gpd import numpy as np import pandas as pd import pytest import shapely from shapely.geometry import Point import pandera as pa from pandera.engines.pandas_engine import DateTime from pandera.engine... | TypeError) | 30 | 9 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/geopandas/test_engine.py | test | unionai-oss/pandera:tests/geopandas/test_engine.py | 164 | 4 | assert | test_engine_geometry_coerce_crs | """Unit tests for the geopandas engine dtype Geometry."""
import geopandas as gpd
import numpy as np
import pandas as pd
import pytest
import shapely
from shapely.geometry import Point
import pandera as pa
from pandera.engines.pandas_engine import DateTime
from pandera.engines.geopandas_engine import Geometry
def t... | np.all(coerced.crs == dtype.crs) | modified | ed0d88bb0e19dcf09edbfb60730d85061d93a4bec69493a68f4355def14694a6 | assert|test_engine_geometry_coerce_crs|"""Unit tests for the geopandas engine dtype Geometry.""" import geopandas as gpd import numpy as np import pandas as pd import pytest import shapely from shapely.geometry import Point import pandera as pa from pandera.engines.pandas_engine import DateTime from pandera.engines.geo... | np.all(coerced.crs == dtype.crs) | 163 | 4 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/geopandas/test_geopandas.py | train | unionai-oss/pandera:tests/geopandas/test_geopandas.py | 163 | 4 | assert | test_schema_dtype_crs_with_coerce | """Unit tests for the geopandas integration."""
import geopandas as gpd
import pandas as pd
import pytest
from shapely.geometry import Point, Polygon
import pandera as pa
from pandera.engines.geopandas_engine import Geometry
from pandera.typing import Series
from pandera.typing.geopandas import GeoDataFrame, GeoSerie... | isinstance(gdf, gpd.GeoDataFrame) | modified | 26aaacc6b908291404e81faee7af8687cf79c4d49b198a2c43f1d5556963f75b | assert|test_schema_dtype_crs_with_coerce|"""Unit tests for the geopandas integration.""" import geopandas as gpd import pandas as pd import pytest from shapely.geometry import Point, Polygon import pandera as pa from pandera.engines.geopandas_engine import Geometry from pandera.typing import Series from pandera.typing.... | isinstance(gdf, gpd.GeoDataFrame) | 163 | 4 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/modin/test_schemas_on_modin.py | train | unionai-oss/pandera:tests/modin/test_schemas_on_modin.py | 275 | 21 | pytest.raises | test_dtype_coercion | """Unit tests for modin data structures."""
import typing
from unittest.mock import MagicMock
import modin.pandas as mpd
import pandas as pd
import pytest
import pandera as pa
from pandera import extensions
from pandera.engines import numpy_engine, pandas_engine, geopandas_engine
from pandera.typing.modin import Dat... | ValueError) | modified | 4922ff098d465b0d046de339a08d1a3eea63b6bf6ae4abf8cc2aa43e887da1f8 | pytest.raises|test_dtype_coercion|"""Unit tests for modin data structures.""" import typing from unittest.mock import MagicMock import modin.pandas as mpd import pandas as pd import pytest import pandera as pa from pandera import extensions from pandera.engines import numpy_engine, pandas_engine, geopandas_engine from ... | ValueError) | 275 | 21 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/pyspark/test_schemas_on_pyspark_pandas.py | train | unionai-oss/pandera:tests/pyspark/test_schemas_on_pyspark_pandas.py | 612 | 4 | assert | test_check_comparison_operators | """Test pandera on pyspark data structures."""
import re
import typing
from unittest.mock import MagicMock
import numpy as np
import pandas as pd
import pyspark.pandas as ps
import pytest
from packaging import version
from pyspark import SparkContext
import pandera as pa
from pandera import dtypes, extensions, syste... | valid_check_result.check_passed | modified | a16deedffd0ed03cd3504b53eb58d1a8cdd4425e3b7aae7d158c2214dc5f5da3 | assert|test_check_comparison_operators|"""Test pandera on pyspark data structures.""" import re import typing from unittest.mock import MagicMock import numpy as np import pandas as pd import pyspark.pandas as ps import pytest from packaging import version from pyspark import SparkContext import pandera as pa from pand... | valid_check_result.check_passed | 612 | 4 |
unionai-oss/pandera | train | 310 | bf5ef4c2efda8c908e5f0f1e3c60aae81c5690b0 | train | tests/strategies/test_strategies.py | train | unionai-oss/pandera:tests/strategies/test_strategies.py | 325 | 4 | assert | test_isin_notin_strategies | # pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa
"""Unit tests for pandera data generating strategies."""
import datetime
import operator
import re
from typing import Any, Callable, Optional, Set
from unittest.mock import MagicMock
from warnings impor... | values | modified | d06c2299634be582133e6052c1d9999b0a34df3cb785f87e6fbde5156bb253cb | assert|test_isin_notin_strategies|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock imp... | values | 325 | 4 |
unionai-oss/pandera | train | 311 | 6fd53f1061360379be12edc159b132f06f2d12be | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 537 | 4 | assert | test_column_regex_matching_non_str_types | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | [*matched_columns] | added | b270e7bb6bbc9dc83c539293236e16667024638d4ab197c1b2d45ecd9242adc6 | assert|test_column_regex_matching_non_str_types|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSc... | null | null | null |
unionai-oss/pandera | train | 311 | 6fd53f1061360379be12edc159b132f06f2d12be | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 658 | 13 | pytest.raises | test_column_type_can_be_set | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | TypeError) | added | 1f231323e65daf0b0984d2cadc2148894cbe2c3e674b03ae4e20facc91992b22 | pytest.raises|test_column_type_can_be_set|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSchema, ... | null | null | null |
unionai-oss/pandera | train | 311 | 6fd53f1061360379be12edc159b132f06f2d12be | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 697 | 13 | pytest.raises | test_multiindex_duplicate_index_names | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | errors.SchemaErrors) | added | 54ae988a03ebe4a40ff077ad063d3dcd55220666c5c713ee98f37ced39df6258 | pytest.raises|test_multiindex_duplicate_index_names|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, Seri... | null | null | null |
unionai-oss/pandera | train | 311 | 6fd53f1061360379be12edc159b132f06f2d12be | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 853 | 13 | pytest.raises | test_multiindex_unordered | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
... | errors.SchemaError) | added | 7855494d436c33cfcfa4f6ac60c42d05012addcb7a2dfc651630f6a72c7a9762 | pytest.raises|test_multiindex_unordered|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSchema, St... | null | null | null |
unionai-oss/pandera | train | 312 | 5352a6f226eb77d954b1a097cf82b34fb2f1d8c5 | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 214 | 4 | assert | test_polars_custom_check | """Unit tests for polars check class."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.constants import CHECK_OUTPUT_KEY
@pytest.fixture
def column_lf():
return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)})
@pyt... | isinstance(validated_lf, pl.LazyFrame) | added | d2419b4cfe387fd971a2041da880c9a32265d5512fed17b775ea0242e3acbfcc | assert|test_polars_custom_check|"""Unit tests for polars check class.""" import polars as pl import pytest import pandera.polars as pa from pandera.api.polars.utils import get_lazyframe_schema from pandera.constants import CHECK_OUTPUT_KEY @pytest.fixture def column_lf(): return pl.LazyFrame({"col": pl.Series([1, 2, 3,... | null | null | null |
unionai-oss/pandera | train | 312 | 5352a6f226eb77d954b1a097cf82b34fb2f1d8c5 | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 220 | 9 | pytest.raises | test_polars_custom_check | """Unit tests for polars check class."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.constants import CHECK_OUTPUT_KEY
@pytest.fixture
def column_lf():
return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)})
@pyt... | pa.errors.SchemaError) | added | a681e724f7005c7d2400f836df7ba62067a09732b26dacb6e5fd5d366c20fddb | pytest.raises|test_polars_custom_check|"""Unit tests for polars check class.""" import polars as pl import pytest import pandera.polars as pa from pandera.api.polars.utils import get_lazyframe_schema from pandera.constants import CHECK_OUTPUT_KEY @pytest.fixture def column_lf(): return pl.LazyFrame({"col": pl.Series([1... | null | null | null |
unionai-oss/pandera | train | 313 | 5a7568eedf499ebe02bce196a8c387cc8c9f110b | train | tests/core/test_extensions.py | train | unionai-oss/pandera:tests/core/test_extensions.py | 327 | 4 | assert | test_custom_error_message | # pylint: disable=no-member,redefined-outer-name,unused-argument
# pylint: disable=unused-variable
"""Unit tests for pandera API extensions."""
from typing import Any, Optional, Union
import pandas as pd
import pytest
import pandera as pa
import pandera.strategies as st
from pandera import DataType, extensions
from ... | "custom error message" | added | 5b0fcf4658b3a8b8b8e7f7371e3dfe6005220412891cca24a84a19b4ef09be09 | assert|test_custom_error_message|# pylint: disable=no-member,redefined-outer-name,unused-argument # pylint: disable=unused-variable """Unit tests for pandera API extensions.""" from typing import Any, Optional, Union import pandas as pd import pytest import pandera as pa import pandera.strategies as st from pandera imp... | null | null | null |
unionai-oss/pandera | train | 314 | 1ec5c31bd9778f0b360934cea9160c3216496bb8 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 354 | 4 | assert | test_check_validate_method_aliased_field | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, List, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
im... | isinstance(Schema.validate(df, lazy=True), pd.DataFrame) | modified | 3c0566258d8e3b84f1ce109c392e7d97028b63c5e4f7e3a55f3cf590ec5c2fc7 | assert|test_check_validate_method_aliased_field|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, List, Optional, TypeVar import panda... | isinstance(Schema.validate(df, lazy=True), pd.DataFrame) | 352 | 4 |
unionai-oss/pandera | train | 314 | 1ec5c31bd9778f0b360934cea9160c3216496bb8 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 516 | 4 | assert | test_inherit_dataframemodel_fields | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, List, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
im... | Child.to_schema() | modified | 0db58f79817c57aef5163c2eb9a76a2041550db6a6d9ecb6e51434b1379a7f5e | assert|test_inherit_dataframemodel_fields|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, List, Optional, TypeVar import pandas as p... | Child.to_schema() | 514 | 4 |
unionai-oss/pandera | train | 314 | 1ec5c31bd9778f0b360934cea9160c3216496bb8 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,237 | 9 | pytest.raises | test_generic_model_single_generic_field | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, List, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
im... | SchemaError) | modified | 34c69ded991a406c6f9617793f40130bc19c5fdcfb122ae84150d9d324accf38 | pytest.raises|test_generic_model_single_generic_field|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, List, Optional, TypeVar import... | SchemaError) | 1,235 | 9 |
unionai-oss/pandera | train | 314 | 1ec5c31bd9778f0b360934cea9160c3216496bb8 | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,371 | 9 | pytest.raises | test_repeated_generic | """Tests schema creation and validation from type annotations."""
# pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods
import re
from copy import deepcopy
from typing import Any, Generic, Iterable, List, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
im... | SchemaError) | modified | 1accfb0e6de29a9ac950d38e3e9c8c9b5715a4a7422772b80cfb35cbf076169f | pytest.raises|test_repeated_generic|"""Tests schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import re from copy import deepcopy from typing import Any, Generic, Iterable, List, Optional, TypeVar import pandas as pd impo... | SchemaError) | 1,369 | 9 |
unionai-oss/pandera | train | 315 | f6317d6c728e7d121dc2953650eacb3e34b21aa3 | train | tests/mypy/test_static_type_checking.py | val | unionai-oss/pandera:tests/mypy/test_static_type_checking.py | 221 | 4 | assert | test_pandas_stubs_false_positives | # pylint: skip-file
"""Unit tests for static type checking of dataframes.
This module uses subprocess and the pytest.capdf fixture to capture the output
of calling mypy on the python modules in the tests/core/static folder.
"""
import importlib
import os
import re
import subprocess
import sys
import typing
from pathl... | len(resulting_errors) | added | be8edd5da9de3a7286905cc62bd6f964e47ff5d1ad7553f0e688eda7ae148cda | assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc... | null | null | null |
unionai-oss/pandera | train | 315 | f6317d6c728e7d121dc2953650eacb3e34b21aa3 | train | tests/mypy/test_static_type_checking.py | val | unionai-oss/pandera:tests/mypy/test_static_type_checking.py | 223 | 8 | assert | test_pandas_stubs_false_positives | # pylint: skip-file
"""Unit tests for static type checking of dataframes.
This module uses subprocess and the pytest.capdf fixture to capture the output
of calling mypy on the python modules in the tests/core/static folder.
"""
import importlib
import os
import re
import subprocess
import sys
import typing
from pathl... | expected["errcode"] | added | 2c0b033e3626b89551eb5d393bb0b124173fcf3c376cdcdeaba4f5c9771ef45e | assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc... | null | null | null |
unionai-oss/pandera | train | 315 | f6317d6c728e7d121dc2953650eacb3e34b21aa3 | train | tests/mypy/test_static_type_checking.py | val | unionai-oss/pandera:tests/mypy/test_static_type_checking.py | 224 | 8 | assert | test_pandas_stubs_false_positives | # pylint: skip-file
"""Unit tests for static type checking of dataframes.
This module uses subprocess and the pytest.capdf fixture to capture the output
of calling mypy on the python modules in the tests/core/static folder.
"""
import importlib
import os
import re
import subprocess
import sys
import typing
from pathl... | expected["msg"] == error["msg"] or re.match( expected["msg"], error["msg"] ) | added | d41496b568f91b8dbe8e006cad5ff0ac2a127d7aaef3d80edaca608c0ec6b250 | assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_check.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_check.py | 1,257 | 13 | pytest.raises | test_failed_unaccepted_datatypes | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from unittest import mock
import pytest
from pyspark.sql.functions import col
from pyspark.sql.types import (
ArrayType,
BooleanType,
ByteType,
DateType,
DecimalType,
DoubleType,
FloatTy... | TypeError) | added | e963b515225760618f964fca05a1394606c94e191437dd00cb7a2e82f627cd1d | pytest.raises|test_failed_unaccepted_datatypes|"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from unittest import mock import pytest from pyspark.sql.functions import col from pyspark.sql.types import ( ArrayType, BooleanType, ByteType, DateType, DecimalType, Do... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_config.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_config.py | 57 | 12 | assert | test_disable_validation | """This module is to test the behaviour change based on defined config in pandera"""
# pylint:disable=import-outside-toplevel,abstract-method
import pyspark.sql.types as T
import pytest
from pandera.config import ValidationDepth, config_context, get_config_context
from pandera.pyspark import (
Check,
Column,... | input_df | added | 15fdf78a55c89ed33347dbd571dc06469bcf0e196f6bd592e61ef6958b3c6bfa | assert|test_disable_validation|"""This module is to test the behaviour change based on defined config in pandera""" # pylint:disable=import-outside-toplevel,abstract-method import pyspark.sql.types as T import pytest from pandera.config import ValidationDepth, config_context, get_config_context from pandera.pyspark imp... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_container.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_container.py | 349 | 4 | assert | test_schema_to_structtype | """Unit tests for pyspark container."""
import platform
from contextlib import nullcontext as does_not_raise
from datetime import date, datetime
from decimal import Decimal
import pyspark.sql.types as T
import pytest
from pyspark.sql import DataFrame, Row
import pandera.errors
import pandera.pyspark as pa
from pande... | T.StructType( [ T.StructField( name="non_nullable", dataType=T.IntegerType(), nullable=True ), T.StructField( name="binary", dataType=T.BinaryType(), nullable=True ), T.StructField(name="byte", dataType=T.ByteType(), nullable=True), T.StructField(name="text", dataType=T.StringType(), nullable=True), T.StructField( name... | added | 27af6483001de0a0873ad7a8ed00d03f2e21211d7fd83afddb8a7a868a09e0fa | assert|test_schema_to_structtype|"""Unit tests for pyspark container.""" import platform from contextlib import nullcontext as does_not_raise from datetime import date, datetime from decimal import Decimal import pyspark.sql.types as T import pytest from pyspark.sql import DataFrame, Row import pandera.errors import pa... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_decorators.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py | 128 | 12 | assert | test_cache_dataframe_settings | """This module is to test the behaviour change based on defined config in pandera"""
# pylint:disable=import-outside-toplevel,abstract-method
import logging
from contextlib import nullcontext as does_not_raise
import pyspark.sql.types as T
import pytest
from pyspark.sql import DataFrame
from pandera.backends.pyspar... | caplog.text | added | f7a3d69ce4e41738e7c3252fab3a9f8b669266ec93b708737742d7d37dc1a36b | assert|test_cache_dataframe_settings|"""This module is to test the behaviour change based on defined config in pandera""" # pylint:disable=import-outside-toplevel,abstract-method import logging from contextlib import nullcontext as does_not_raise import pyspark.sql.types as T import pytest from pyspark.sql import DataF... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_dtypes.py | val | unionai-oss/pandera:tests/pyspark/test_pyspark_dtypes.py | 431 | 8 | assert | test_pyspark_map_type | """Unit tests for pyspark container."""
from typing import Any
import pytest
import pyspark
import pyspark.sql.types as T
from pyspark.sql import DataFrame
from pandera.backends.pyspark.decorators import validate_scope
from pandera.config import PanderaConfig
from pandera.pyspark import Column, DataFrameSchema
from ... | { "WRONG_DATATYPE": [ { "schema": None, "column": "product_details", "check": f"dtype('{str(T.MapType(T.StringType(), T.IntegerType(), True))}')", "error": f"expected column 'product_details' to have type {str(T.MapType(T.StringType(), T.IntegerType(), True))}, got {str(T.MapType(T.StringType(), T.StringType(), True))}... | added | ebfd4921a38c7e95817fc7f218bf51c0a1909fed5c148e9b9ae1ea54c2ea64c9 | assert|test_pyspark_map_type|"""Unit tests for pyspark container.""" from typing import Any import pytest import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.backends.pyspark.decorators import validate_scope from pandera.config import PanderaConfig from pandera.pyspark import Col... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_error.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_error.py | 122 | 4 | assert | test_pyspark_check_nullable | """Unit tests for dask_accessor module."""
# pylint:disable=redefined-outer-name,abstract-method
import pyspark.sql.types as T
import pytest
from pyspark.sql.types import StringType
import pandera.pyspark as pa
from pandera.api.base import error_handler
from pandera.errors import SchemaError, SchemaErrorReason
from ... | expected | added | d90aef02df64b66bdbb3490372167fce626c4d9a433bb86c18b88ca002018800 | assert|test_pyspark_check_nullable|"""Unit tests for dask_accessor module.""" # pylint:disable=redefined-outer-name,abstract-method import pyspark.sql.types as T import pytest from pyspark.sql.types import StringType import pandera.pyspark as pa from pandera.api.base import error_handler from pandera.errors import Sche... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_pyspark_model.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_model.py | 196 | 4 | assert | test_pyspark_bare_fields | """Unit tests for DataFrameModel module."""
# pylint:disable=abstract-method
from contextlib import nullcontext as does_not_raise
from typing import Optional
import pyspark.sql.types as T
import pytest
from pyspark.sql import DataFrame
import pandera
import pandera.api.extensions as pax
import pandera.pyspark as pa... | None | added | 8857e77cef529bdf8ffbfcbb9b5aea22f1349fc72bef3c75927494d6e81e3cfd | assert|test_pyspark_bare_fields|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional import pyspark.sql.types as T import pytest from pyspark.sql import DataFrame import pandera import pandera.api.extensions as pax ... | null | null | null |
unionai-oss/pandera | train | 316 | d04bb3a3591fea8fd5afccbf484f73509f923284 | train | tests/pyspark/test_schemas_on_pyspark_pandas.py | train | unionai-oss/pandera:tests/pyspark/test_schemas_on_pyspark_pandas.py | 701 | 4 | assert | test_init_pyspark_pandas_dataframe | """Test pandera on pyspark data structures."""
import re
import typing
from unittest.mock import MagicMock
import numpy as np
import pandas as pd
import pyspark
import pyspark.pandas as ps
import pytest
from packaging import version
import pandera as pa
from pandera import dtypes, extensions, system
from pandera.eng... | isinstance( DataFrame[InitSchema]({"col1": [1], "col2": [1.0], "col3": ["1"]}), DataFrame, ) | modified | 158349dff7ef78ef1dcea01a13d6986bb81c1dc37dab3b3c377b171f57571f05 | assert|test_init_pyspark_pandas_dataframe|"""Test pandera on pyspark data structures.""" import re import typing from unittest.mock import MagicMock import numpy as np import pandas as pd import pyspark import pyspark.pandas as ps import pytest from packaging import version import pandera as pa from pandera import dtyp... | isinstance( DataFrame[InitSchema]({"col1": [1], "col2": [1.0], "col3": ["1"]}), DataFrame, ) | 701 | 4 |
unionai-oss/pandera | train | 317 | 2a9d0451f442b15ff8c6f7c92d66d3c7456504e2 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,523 | 8 | assert_* | test_lazy_dataframe_validation_nullable_with_checks | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | expected_failure_cases) | added | 8701f92a8d4f3c891d5898b93cf8101adb11bd31c4bca77e9455f67d786de0e5 | assert_*|test_lazy_dataframe_validation_nullable_with_checks|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, T... | null | null | null |
unionai-oss/pandera | train | 317 | 2a9d0451f442b15ff8c6f7c92d66d3c7456504e2 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,550 | 9 | pytest.raises | test_lazy_dataframe_scalar_false_check | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | errors.SchemaErrors) | added | 0bdf7ac81d9f1d6e0afba3dc7c6d5861e2537146ec9833a85a80f407ab5a9963 | pytest.raises|test_lazy_dataframe_scalar_false_check|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Uni... | null | null | null |
unionai-oss/pandera | train | 317 | 2a9d0451f442b15ff8c6f7c92d66d3c7456504e2 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,801 | 8 | assert | test_schema_coerce_inplace_validation | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | to_dtype | added | 09c25f6abc8a6f4fd403cd618a38144020df5c58879a91dde29e225ce9fbeabb | assert|test_schema_coerce_inplace_validation|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Union impor... | null | null | null |
unionai-oss/pandera | train | 317 | 2a9d0451f442b15ff8c6f7c92d66d3c7456504e2 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,979 | 9 | pytest.raises | test_invalid_keys | """Testing creation and manipulation of DataFrameSchema objects."""
# pylint: disable=too-many-lines,redefined-outer-name
import copy
from datetime import datetime, timedelta
from functools import partial
from typing import Any, Callable, Dict, List, Tuple, Type, Union
import numpy as np
import pandas as pd
import p... | TypeError) | added | 003af110f9c9aeded553e61bf697684209679196815fb0f6559d1281d0895e21 | pytest.raises|test_invalid_keys|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Union import numpy as np... | null | null | null |
unionai-oss/pandera | train | 318 | 13bb3ce2b1d0789b14fd49a7b8499b529b359c12 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 212 | 9 | pytest.raises | test_coerce_cast_failed | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | exception_cls) | modified | 1fdde198e1d96da7c7562b60d114b0d60f88bcb324b76303d9698c5102c668fe | pytest.raises|test_coerce_cast_failed|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_eq... | exception_cls) | 213 | 9 |
unionai-oss/pandera | train | 318 | 13bb3ce2b1d0789b14fd49a7b8499b529b359c12 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 238 | 4 | assert | test_check_not_equivalent | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | False | modified | 834b66923af40674725af03bd64cdb21320ad1916bf8cc110272f12741a8e34a | assert|test_check_not_equivalent|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_equal f... | False | 239 | 4 |
unionai-oss/pandera | train | 318 | 13bb3ce2b1d0789b14fd49a7b8499b529b359c12 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 246 | 4 | assert | test_check_equivalent | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | True | modified | 70bae773bccf07290dd9c35d6d67a061b0c87a56ee6893721bbbe3a9356414e6 | assert|test_check_equivalent|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_equal from ... | True | 247 | 4 |
unionai-oss/pandera | train | 318 | 13bb3ce2b1d0789b14fd49a7b8499b529b359c12 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 321 | 4 | assert_* | test_polars_object_coercible | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | result) | modified | bbbe8fed8700e4d90fc54f8f0191cb7a8a7b746e76badba8c6e1ed84f62deb96 | assert_*|test_polars_object_coercible|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_frame_eq... | result) | 322 | 4 |
unionai-oss/pandera | train | 319 | 82eb40628acd32df6fbe6f9afe8cc79e5bf7ffc7 | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 79 | 4 | assert | test_validation_disabled | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.api.base.error_handler... | schema.validate(invalid).equals(invalid) | added | 9a1d201ff4aacd15d8e6ec61849eeb418284818753419a4307cce90b61e34c9c | assert|test_validation_disabled|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.polars.utils import get_lazyframe_schema from ... | null | null | null |
unionai-oss/pandera | train | 319 | 82eb40628acd32df6fbe6f9afe8cc79e5bf7ffc7 | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 111 | 8 | assert | test_lazyframe_validation_depth_none | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.api.base.error_handler... | exc.message | added | df6546813788dea8e55aebf5df8ee46cf077703d8515649560bab57a7e71b53a | assert|test_lazyframe_validation_depth_none|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.polars.utils import get_lazyframe_... | null | null | null |
unionai-oss/pandera | train | 319 | 82eb40628acd32df6fbe6f9afe8cc79e5bf7ffc7 | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 159 | 9 | pytest.raises | test_lazyframe_validation_depth_schema_and_data | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.api.base.error_handler... | pa.errors.SchemaError, match="Column 'a' failed validator .+ <Check greater_than") | added | 31be9939f1be7b027d17e002f8a4486085344e8ca4feb93c63136852ce75564a | pytest.raises|test_lazyframe_validation_depth_schema_and_data|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.polars.utils imp... | null | null | null |
unionai-oss/pandera | train | 319 | 82eb40628acd32df6fbe6f9afe8cc79e5bf7ffc7 | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 187 | 9 | pytest.raises | test_coerce_validation_depth_none | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.engines.polars_engine import polars_version
from pandera.api.polars.utils import get_lazyframe_schema
from pandera.api.base.error_handler... | ErrorCls) | added | 4f2640b81b89725fadc5237f5b2ed5d0434a4335a68ce87d0119b7aded93864f | pytest.raises|test_coerce_validation_depth_none|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import polars as pl import pytest import pandera.polars as pa from pandera.engines.polars_engine import polars_version from pandera.api.polars.utils import get_lazyfr... | null | null | null |
unionai-oss/pandera | train | 320 | 90633f2c7ec269e5f9be35cedf0155abef9b9c65 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 443 | 4 | assert | test_polars_nested_dtypes_try_coercion | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | coerced_data.collect().equals(data.collect()) | modified | ba0497b3ba9fc7d35a5840229093797fd0ea290ebaca090d92f216684939d291 | assert|test_polars_nested_dtypes_try_coercion|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_... | exc.failure_cases.select(col).equals(data.collect()) | 444 | 8 |
unionai-oss/pandera | train | 320 | 90633f2c7ec269e5f9be35cedf0155abef9b9c65 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 450 | 8 | assert | test_polars_nested_dtypes_try_coercion | """Polars dtype tests."""
import datetime
import decimal
from decimal import Decimal
from typing import Sequence, Tuple, Union
import polars as pl
import pytest
from hypothesis import given, settings
from hypothesis import strategies as st
from polars.testing import assert_frame_equal
from polars.testing.parametric i... | exc.failure_cases.select(col).equals(data.collect()) | added | f5aaa6f415092d6111754d3fe07a53b68ff9ec3b5294fa6618122e3576321f4f | assert|test_polars_nested_dtypes_try_coercion|"""Polars dtype tests.""" import datetime import decimal from decimal import Decimal from typing import Sequence, Tuple, Union import polars as pl import pytest from hypothesis import given, settings from hypothesis import strategies as st from polars.testing import assert_... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.