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 | 258 | 4df61da2109b40d87427335928b4d12788ef29bd | train | tests/core/test_decorators.py | train | unionai-oss/pandera:tests/core/test_decorators.py | 1,030 | 4 | assert | test_check_types_star_kwargs | """Testing the Decorators that check a functions input or output."""
import typing
from asyncio import AbstractEventLoop
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Field,
Float,
Int,
DataFrameModel,
String,
... | ["kwarg2", "kwarg3"] | added | 837a02de519761f41023869475436ceff9c545f833ff4c7b13b4af3bcd42daf4 | assert|test_check_types_star_kwargs|"""Testing the Decorators that check a functions input or output.""" import typing from asyncio import AbstractEventLoop import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Field, Float, Int, DataFrameModel, String, che... | null | null | null |
unionai-oss/pandera | train | 258 | 4df61da2109b40d87427335928b4d12788ef29bd | train | tests/core/test_decorators.py | train | unionai-oss/pandera:tests/core/test_decorators.py | 1,069 | 8 | assert_* | test_check_types_star_args_kwargs | """Testing the Decorators that check a functions input or output."""
import typing
from asyncio import AbstractEventLoop
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Field,
Float,
Int,
DataFrameModel,
String,
... | actual) | added | 09ef906a14c6fdaa81c674312793f1d0f9250469b435270ce8f0f2a8a50e62fc | assert_*|test_check_types_star_args_kwargs|"""Testing the Decorators that check a functions input or output.""" import typing from asyncio import AbstractEventLoop import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Field, Float, Int, DataFrameModel, Stri... | null | null | null |
unionai-oss/pandera | train | 258 | 4df61da2109b40d87427335928b4d12788ef29bd | train | tests/core/test_decorators.py | train | unionai-oss/pandera:tests/core/test_decorators.py | 1,171 | 17 | pytest.raises | test_coroutines | """Testing the Decorators that check a functions input or output."""
import typing
from asyncio import AbstractEventLoop
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Field,
Float,
Int,
DataFrameModel,
String,
... | errors.SchemaError) | added | 5ef36461fbaa87a65f4e6294d22a77c0fe0938e195a917ce66d1963f52fbf4c9 | pytest.raises|test_coroutines|"""Testing the Decorators that check a functions input or output.""" import typing from asyncio import AbstractEventLoop import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Field, Float, Int, DataFrameModel, String, check_inp... | null | null | null |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/core/test_checks.py | train | unionai-oss/pandera:tests/core/test_checks.py | 493 | 8 | assert | test_custom_check_error_is_failure_case | """Tests the way Columns are Checked"""
import copy
import pandas as pd
import pytest
from pandera import (
Bool,
Check,
Column,
DataFrameSchema,
Float,
Index,
Int,
SeriesSchema,
String,
errors,
)
from pandera.backends.pandas import error_formatters
def test_vectorized_check... | {"CHECK_ERROR": 1} | modified | 333adcb931188f800eafe1214576bfdd6af061dd9f6722db8a314718a9a32e1d | assert|test_custom_check_error_is_failure_case|"""Tests the way Columns are Checked""" import copy import pandas as pd import pytest from pandera import ( Bool, Check, Column, DataFrameSchema, Float, Index, Int, SeriesSchema, String, errors, ) from pandera.backends.pandas import error_formatters def test_vectorized_che... | {errors.SchemaErrorReason.CHECK_ERROR: 1} | 493 | 8 |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/core/test_decorators.py | train | unionai-oss/pandera:tests/core/test_decorators.py | 911 | 9 | pytest.raises | test_check_types_union_args | """Testing the Decorators that check a functions input or output."""
import typing
from asyncio import AbstractEventLoop
import numpy as np
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Field,
Float,
Int,
DataFrameModel,
String,
... | errors.SchemaErrors) | modified | 4785e5d491a4cc35de9d34e0701086e7284b707bfd2f4494acbd3ebb7945206e | pytest.raises|test_check_types_union_args|"""Testing the Decorators that check a functions input or output.""" import typing from asyncio import AbstractEventLoop import numpy as np import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Field, Float, Int, DataFrameModel, Strin... | errors.SchemaErrors) | 910 | 9 |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/core/test_errors.py | train | unionai-oss/pandera:tests/core/test_errors.py | 64 | 8 | assert | test_pickle | """Test pickling behavior of SchemaError and SchemaErrors.
See issue #713:
In a multiprocessing or concurrent.futures.ProcessPoolExecutor
situation if a subprocess does not handle the SchemaError itself, it is pickled
and piped back to the main process. This requires picklability, and limits the
pickled size to 2 GiB.... | pickled | modified | 2e9a84b3999f129613fd2fa455ce0d22e1bfce8e3f3bfd635c0ac5e4c7177217 | assert|test_pickle|"""Test pickling behavior of SchemaError and SchemaErrors. See issue #713: In a multiprocessing or concurrent.futures.ProcessPoolExecutor situation if a subprocess does not handle the SchemaError itself, it is pickled and piped back to the main process. This requires picklability, and limits the pick... | pickled | 63 | 8 |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 987 | 4 | assert | test_schema_equality_operators | """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... | copy.deepcopy(series_schema) | modified | ea86f0e091849f4b947678339a833d2d85716c041b376f32c8a99211343573e2 | assert|test_schema_equality_operators|"""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... | copy.deepcopy(series_schema) | 990 | 4 |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/pyspark/test_pyspark_check.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_check.py | 113 | 8 | assert | test_datatype_check_decorator | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from pyspark.sql.functions import col
from pyspark.sql.types import (
LongType,
StringType,
StructField,
StructType,
IntegerType,
ByteType,
ShortType,
TimestampType,
DateType,
... | expected["DATA"] | added | 9a520c600e4a6d394c2f6f32ca776e7200b9b14d41be106ecf8f9b8290a3daef | assert|test_datatype_check_decorator|"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from pyspark.sql.functions import col from pyspark.sql.types import ( LongType, StringType, StructField, StructType, IntegerType, ByteType, ShortType, TimestampType, DateType, Dec... | null | null | null |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/pyspark/test_pyspark_config.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_config.py | 360 | 8 | 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 pyspark.sql.types as T
import pytest
from pandera.config import CONFIG, ValidationDepth
from pandera.pyspark import (
Check,
DataFrameSchema,
Column,
Da... | expected | modified | 4443d64fd2c79cb6e929ac854b03b66eccadf47c23b5e0874d83b941d61e7292 | 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 pyspark.sql.types as T import pytest from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrame... | expected | 359 | 8 |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/pyspark/test_pyspark_dtypes.py | val | unionai-oss/pandera:tests/pyspark/test_pyspark_dtypes.py | 27 | 8 | assert | """Unit tests for pyspark container."""
from typing import Any
import pyspark
import pyspark.sql.types as T
from pyspark.sql import DataFrame
from pandera.validation_depth import ValidationScope
from pandera.pyspark import DataFrameSchema, Column
from tests.pyspark.conftest import spark_df
from pandera.config import ... | isinstance(pandera_schema.validate(df), DataFrame) | modified | b1ed126124673ab988626189867358fe7771ef01f4eb0315d11f5856032e61de | assert||"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.validation_depth import ValidationScope from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config i... | isinstance(pandera_schema.validate(df), DataFrame) | 26 | 8 | |
unionai-oss/pandera | train | 259 | 2432bf072898443068b0236b710347b8c2350824 | train | tests/pyspark/test_pyspark_error.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_error.py | 202 | 4 | assert | test_pyspark_schema_data_checks | """Unit tests for dask_accessor module."""
# pylint:disable=redefined-outer-name,abstract-method
from typing import Union
from pyspark.sql import DataFrame, SparkSession
from pyspark.sql.functions import col
import pyspark.sql.types as T
from pyspark.sql.types import StringType
import pytest
from pandera.errors imp... | expected["SCHEMA"] | modified | 9fcd462a374162cf336c10dc7106457df3953c73fb2e306c5d85b69c347ac50e | assert|test_pyspark_schema_data_checks|"""Unit tests for dask_accessor module.""" # pylint:disable=redefined-outer-name,abstract-method from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col import pyspark.sql.types as T from pyspark.sql.types import StringType im... | expected["SCHEMA"] | 201 | 4 |
unionai-oss/pandera | train | 260 | 17c558f392e2c6f3c176cd0375a52371ae697d84 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 777 | 8 | assert | test_coerce_dtype_in_dataframe | """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... | Engine.dtype(int) | added | d63929295c93f5d403c2525a2e309a63cefd1a7fac22dcca5af176fa850a2d2c | assert|test_coerce_dtype_in_dataframe|"""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... | null | null | null |
unionai-oss/pandera | train | 260 | 17c558f392e2c6f3c176cd0375a52371ae697d84 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,005 | 4 | assert | test_schema_equality_operators | """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... | copy.deepcopy(df_schema) | added | 2334d01535838fbc8bb38ed0c20820d635e03d3c6c8ea5d5efb26d13f6b9e7e3 | assert|test_schema_equality_operators|"""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... | null | null | null |
unionai-oss/pandera | train | 260 | 17c558f392e2c6f3c176cd0375a52371ae697d84 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 1,766 | 4 | 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 | 7f3dac7782bd9818ab1ebbee6c34e6a4d0176ae8b9538169bca14b8734e8fff7 | 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 | 260 | 17c558f392e2c6f3c176cd0375a52371ae697d84 | train | tests/core/test_schemas.py | test | unionai-oss/pandera:tests/core/test_schemas.py | 2,385 | 4 | assert_* | test_drop_invalid_for_column | """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... | actual_obj.reset_index(drop=True)) | added | 58e405f86aa0dcdbc0aab35bd3a2fe04c59dc310bd9c1b8f93a85008042e7f85 | assert_*|test_drop_invalid_for_column|"""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... | null | null | null |
unionai-oss/pandera | train | 261 | ce728ddc7d0ef5e259954e51cdfc2910e86367eb | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 43 | 4 | assert | test_basic_polars_lazy_dataframe | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return (
pl.DataFrame({"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]})
.lazy()
... | isinstance(query, pl.LazyFrame) | added | cc0eba52b87c3d1e845714a0cd7b9172582723e373e805457d372646c3b3ede6 | assert|test_basic_polars_lazy_dataframe|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return ( pl.DataFrame({"string_col": ["a", "b", "c"], "int_col": [0, 1,... | null | null | null |
unionai-oss/pandera | train | 261 | ce728ddc7d0ef5e259954e51cdfc2910e86367eb | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 44 | 4 | assert | test_basic_polars_lazy_dataframe | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return (
pl.DataFrame({"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]})
.lazy()
... | isinstance(df, pl.DataFrame) | added | 7953883445236be9c4ccd182e27729d2d8d2246b7a820b22f85c52f7a213c130 | assert|test_basic_polars_lazy_dataframe|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return ( pl.DataFrame({"string_col": ["a", "b", "c"], "int_col": [0, 1,... | null | null | null |
unionai-oss/pandera | train | 261 | ce728ddc7d0ef5e259954e51cdfc2910e86367eb | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 55 | 9 | pytest.raises | test_basic_polars_lazy_dataframe_dtype_error | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return (
pl.DataFrame({"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]})
.lazy()
... | error_cls) | added | 93504447299f8bd9013575ce9b35d6afe57915c4eae6c2ff8216d3394d3bd4c8 | pytest.raises|test_basic_polars_lazy_dataframe_dtype_error|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return ( pl.DataFrame({"string_col": ["a", "b", "c"]... | null | null | null |
unionai-oss/pandera | train | 261 | ce728ddc7d0ef5e259954e51cdfc2910e86367eb | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 118 | 4 | assert | test_basic_polars_lazy_dataframe_check_error | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return (
pl.DataFrame({"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]})
.lazy()
... | validated_df.frame_equal(ldf_basic.collect()) | added | bbda0b1f7825e42fd7ac4fc29aa47ce601af127bfce74e1095d593ed91da622d | assert|test_basic_polars_lazy_dataframe_check_error|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return ( pl.DataFrame({"string_col": ["a", "b", "c"], "int_... | null | null | null |
unionai-oss/pandera | train | 262 | a951ed0315a908565dfaf2214126194cde3436a8 | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 157 | 17 | pytest.raises | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from operator import methodcaller
import polars as pl
from polars.datatypes import (
Float32,
Float64,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
Date,
... | SchemaError) | added | e0b558f236b204c8e58f3e101d9f754baa242f4dba854f6f85665034ba86c5b5 | pytest.raises||"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from operator import methodcaller import polars as pl from polars.datatypes import ( Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Date, Time, Duration, Datetime, Object, ... | null | null | null | |
unionai-oss/pandera | train | 262 | a951ed0315a908565dfaf2214126194cde3436a8 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 42 | 4 | assert | test_basic_polars_lazy_dataframe | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return pl.DataFrame(
{"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]}
).lazy()
@pyte... | isinstance(query, pl.LazyFrame) | modified | 9b21d5e349f9fb5b4819b6c34db13f9ec77eaed3ae4f91ed57d8295fd60b26c5 | assert|test_basic_polars_lazy_dataframe|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return pl.DataFrame( {"string_col": ["a", "b", "c"], "int_col": [0, 1, ... | isinstance(query, pl.LazyFrame) | 43 | 4 |
unionai-oss/pandera | train | 262 | a951ed0315a908565dfaf2214126194cde3436a8 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 43 | 4 | assert | test_basic_polars_lazy_dataframe | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return pl.DataFrame(
{"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]}
).lazy()
@pyte... | isinstance(df, pl.DataFrame) | modified | 11b78c7edef85f5178233c9901202fdc60d7fb9c26dd7104cbd54a3b809c9b6a | assert|test_basic_polars_lazy_dataframe|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return pl.DataFrame( {"string_col": ["a", "b", "c"], "int_col": [0, 1, ... | isinstance(df, pl.DataFrame) | 44 | 4 |
unionai-oss/pandera | train | 262 | a951ed0315a908565dfaf2214126194cde3436a8 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 54 | 9 | pytest.raises | test_basic_polars_lazy_dataframe_dtype_error | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return pl.DataFrame(
{"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]}
).lazy()
@pyte... | error_cls) | modified | 97fc3389952aa56f90979de48346814135c2729990f02f2e64aacb2dbe7c321d | pytest.raises|test_basic_polars_lazy_dataframe_dtype_error|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return pl.DataFrame( {"string_col": ["a", "b", "c"],... | error_cls) | 55 | 9 |
unionai-oss/pandera | train | 262 | a951ed0315a908565dfaf2214126194cde3436a8 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 114 | 4 | assert | test_basic_polars_lazy_dataframe_check_error | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return pl.DataFrame(
{"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]}
).lazy()
@pyte... | validated_df.frame_equal(ldf_basic.collect()) | added | 703e5fc2307d950e324b633ddf125018ad4397e0a05462379339108cd2b045f2 | assert|test_basic_polars_lazy_dataframe_check_error|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return pl.DataFrame( {"string_col": ["a", "b", "c"], "int_c... | null | null | null |
unionai-oss/pandera | train | 263 | b20c05689ce84ee4bc205f8e76b9ab4362da2d35 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 117 | 8 | assert_* | test_coerce_no_cast | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | coerced) | added | 3089c74e7944afb393c0ee0ab9620584ce094ae0eb0f388f8ee6d6a627bf5f63 | assert_*|test_coerce_no_cast|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing impo... | null | null | null |
unionai-oss/pandera | train | 263 | b20c05689ce84ee4bc205f8e76b9ab4362da2d35 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 146 | 8 | assert | test_coerce_no_cast_special | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | to_dtype.type | added | fd5516f32075c3b2feab0f1aa1f3bae9a4e3a87315b4fcabc94e62a57fa1b79a | assert|test_coerce_no_cast_special|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testin... | null | null | null |
unionai-oss/pandera | train | 263 | b20c05689ce84ee4bc205f8e76b9ab4362da2d35 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 191 | 4 | assert | test_coerce_cast_special | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | pandera_dtype.type | added | 1bb0399f449884a72e2c7003b3814b11218209cf5e0cb4fa02d2ec1c10040ad7 | assert|test_coerce_cast_special|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing i... | null | null | null |
unionai-oss/pandera | train | 263 | b20c05689ce84ee4bc205f8e76b9ab4362da2d35 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 268 | 4 | assert | test_check_not_equivalent | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | False | added | a7506b83dace10c51b22367156852ff3297c624625fe8e409c0276a09514c405 | assert|test_check_not_equivalent|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing ... | null | null | null |
unionai-oss/pandera | train | 264 | 1b6fbda9959ddab793559908de819109c974dd30 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 113 | 4 | assert | test_basic_polars_lazy_dataframe_check_error | """Unit tests for polars container."""
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_basic():
return pl.DataFrame(
{"string_col": ["a", "b", "c"], "int_col": [0, 1, 2]}
).lazy()
@pyte... | validated_df.frame_equal(ldf_basic.collect()) | modified | 5447f3414185c8a75b00bcc0d6ca2b0e8428157b82325ec540f68829633eb7fe | assert|test_basic_polars_lazy_dataframe_check_error|"""Unit tests for polars container.""" import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.polars import Column, DataFrameSchema @pytest.fixture def ldf_basic(): return pl.DataFrame( {"string_col": ["a", "b", "c"], "int_c... | validated_df.frame_equal(ldf_basic.collect()) | 114 | 4 |
unionai-oss/pandera | train | 264 | 1b6fbda9959ddab793559908de819109c974dd30 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 257 | 4 | assert | test_try_coerce_cast_failed | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | None | modified | 080632a4d1f099af24d19f8ee7edee38709f6f79271b9cfc8ec2cd09c58d4908 | assert|test_try_coerce_cast_failed|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testin... | None | 257 | 4 |
unionai-oss/pandera | train | 264 | 1b6fbda9959ddab793559908de819109c974dd30 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 268 | 4 | assert | test_check_not_equivalent | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | False | modified | e4fab9618d23ca73964342e752a80cb7ab6818e70150df195eca6685174ef4df | assert|test_check_not_equivalent|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing ... | False | 268 | 4 |
unionai-oss/pandera | train | 264 | 1b6fbda9959ddab793559908de819109c974dd30 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 276 | 4 | assert | test_check_equivalent | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | True | modified | 419c947107eb33c1971986a951e5464fac9d8106ce570cab3b818dbeabe95d17 | assert|test_check_equivalent|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing impo... | True | 276 | 4 |
unionai-oss/pandera | train | 264 | 1b6fbda9959ddab793559908de819109c974dd30 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 308 | 4 | assert | test_check_equivalent_custom | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | equivalent | added | 817d172094f537c0bf4c1be376b525f70b096f496b666866ca02f18f394a5c25 | assert|test_check_equivalent_custom|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testi... | null | null | null |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/core/test_model_components.py | train | unionai-oss/pandera:tests/core/test_model_components.py | 72 | 4 | assert | test_field_checks | """Tests individual model components."""
from typing import Any
import pytest
import pandera as pa
from pandera.engines.pandas_engine import Engine
def test_field_to_column() -> None:
"""Test that Field outputs the correct column options."""
for flag in ["nullable", "unique", "coerce", "regex"]:
fo... | expected | modified | 0404442e9c896fcf54eedc930a37e88f66c98570fb5e9cdcc127f63758c634d7 | assert|test_field_checks|"""Tests individual model components.""" from typing import Any import pytest import pandera as pa from pandera.engines.pandas_engine import Engine def test_field_to_column() -> None: """Test that Field outputs the correct column options.""" for flag in ["nullable", "unique", "coerce", "regex"]... | expected | 70 | 4 |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/core/test_schema_components.py | train | unionai-oss/pandera:tests/core/test_schema_components.py | 756 | 4 | assert | test_multiindex_ordered | """Testing the components of the Schema objects."""
import copy
from typing import Any, List, Optional, Tuple, Type
import pandas as pd
import pytest
from pandera import (
Check,
Column,
DataFrameSchema,
DateTime,
Float,
Index,
Int,
MultiIndex,
SeriesSchema,
String,
errors... | isinstance(schema(pd.DataFrame(index=multiindex)), pd.DataFrame) | modified | e9743065d8780ee9eaed3fd20a0964d7dce75b62d6450420c7e174ac42f421f4 | assert|test_multiindex_ordered|"""Testing the components of the Schema objects.""" import copy from typing import Any, List, Optional, Tuple, Type import pandas as pd import pytest from pandera import ( Check, Column, DataFrameSchema, DateTime, Float, Index, Int, MultiIndex, SeriesSchema, String, errors, ) from pandera... | isinstance(schema(pd.DataFrame(index=multiindex)), pd.DataFrame) | 753 | 4 |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/polars/test_polars_components.py | train | unionai-oss/pandera:tests/polars/test_polars_components.py | 58 | 4 | assert | test_column_schema_regex | """Unit tests for polars components."""
from typing import List
import polars as pl
import pytest
import pandera.polars as pa
from pandera.backends.base import CoreCheckResult
from pandera.backends.polars.components import ColumnBackend
from pandera.errors import SchemaError, SchemaDefinitionError
DTYPES_AND_DATA ... | validated_data.equals(data.collect()) | added | 5880210694a26083bc2df39d88bb0a9c30056a10067d37ef00bb58846bb49d8a | assert|test_column_schema_regex|"""Unit tests for polars components.""" from typing import List import polars as pl import pytest import pandera.polars as pa from pandera.backends.base import CoreCheckResult from pandera.backends.polars.components import ColumnBackend from pandera.errors import SchemaError, SchemaDefin... | null | null | null |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 90 | 4 | assert | test_basic_polars_lazy_dataframe | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | isinstance(df, pl.DataFrame) | added | 5f385a5242f0c507a4f4916583b6c2f5b790aef6bf52c5524ec31859a0377c6c | assert|test_basic_polars_lazy_dataframe|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataF... | null | null | null |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 211 | 9 | pytest.raises | test_column_absent_error | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | pa.errors.SchemaError, match="column 'int_col' not in dataframe") | added | ef758f85903d19a0e953912c95f4bf8ba26a52d00e8789dcaeb63e6f831ba583 | pytest.raises|test_column_absent_error|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataFr... | null | null | null |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 324 | 4 | assert | test_polars_series_coercible | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | isinstance(is_coercible, pl.Series) | modified | 1538db6840b7cf9411ec511efbba7c9c24130f299ce865bda638476682bdf3ed | assert|test_polars_series_coercible|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testi... | isinstance(is_coercible, pl.Series) | 324 | 4 |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 398 | 8 | assert_* | test_polars_object_coercible | """Polars dtype tests."""
import decimal
import itertools
import random
from decimal import Decimal
from typing import Union, Tuple, Sequence
from unittest.mock import patch
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal, asser... | result) | modified | f708786278a5965f6709d0b7c12fec94a9d7ddbee4d9b0dc9fab604f60fba5b1 | assert_*|test_polars_object_coercible|"""Polars dtype tests.""" import decimal import itertools import random from decimal import Decimal from typing import Union, Tuple, Sequence from unittest.mock import patch from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.tes... | result) | 398 | 8 |
unionai-oss/pandera | train | 265 | fcddf49eb8ad19a6fa05f67538ac1a9f8b262ffa | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 79 | 4 | assert | test_basic_model | """Unit tests for polars dataframe model."""
import pytest
import polars as pl
from pandera.errors import SchemaError
from pandera.polars import DataFrameModel, DataFrameSchema, Column, Field
@pytest.fixture
def ldf_model_basic():
class BasicModel(DataFrameModel):
string_col: str
int_col: int
... | isinstance(query, pl.LazyFrame) | added | 15b213f30055a3212785eeb052d0a35db216f9e63c645d78495bffb1ef90e143 | assert|test_basic_model|"""Unit tests for polars dataframe model.""" import pytest import polars as pl from pandera.errors import SchemaError from pandera.polars import DataFrameModel, DataFrameSchema, Column, Field @pytest.fixture def ldf_model_basic(): class BasicModel(DataFrameModel): string_col: str int_col: int re... | null | null | null |
unionai-oss/pandera | train | 266 | ff46a36dc7eb0d55187d847df0e7a0f12b523447 | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 140 | 17 | pytest.raises | """Unit tests for polars checks."""
# pylint:disable=abstract-method
import datetime
import decimal
import re
from operator import methodcaller
import polars as pl
from polars.datatypes import (
Float32,
Float64,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
Date... | init_exception_cls) | added | 2016d306b32ef70e70fae139bb899a517a7c8fca2d214ade656d539c0617a56a | pytest.raises||"""Unit tests for polars checks.""" # pylint:disable=abstract-method import datetime import decimal import re from operator import methodcaller import polars as pl from polars.datatypes import ( Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Date, Time, Duration, Datetime, Bi... | null | null | null | |
unionai-oss/pandera | train | 266 | ff46a36dc7eb0d55187d847df0e7a0f12b523447 | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 159 | 13 | pytest.raises | """Unit tests for polars checks."""
# pylint:disable=abstract-method
import datetime
import decimal
import re
from operator import methodcaller
import polars as pl
from polars.datatypes import (
Float32,
Float64,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
Date... | SchemaError) | added | 07ec12be4aa7df83c70d5dd4df74dc3261cd5a9b22aaead6a10757b2340899c1 | pytest.raises||"""Unit tests for polars checks.""" # pylint:disable=abstract-method import datetime import decimal import re from operator import methodcaller import polars as pl from polars.datatypes import ( Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Date, Time, Duration, Datetime, Bi... | null | null | null | |
unionai-oss/pandera | train | 266 | ff46a36dc7eb0d55187d847df0e7a0f12b523447 | train | tests/pyspark/test_pyspark_check.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_check.py | 258 | 13 | pytest.raises | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from pyspark.sql.functions import col
from pyspark.sql.types import (
LongType,
StringType,
StructField,
StructType,
IntegerType,
ByteType,
ShortType,
TimestampType,
DateType,
... | PysparkSchemaError) | modified | 1c24e4b4431e3e6740dc274c10106634dc283053919ef0709c19b3d7f9352102 | pytest.raises||"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from pyspark.sql.functions import col from pyspark.sql.types import ( LongType, StringType, StructField, StructType, IntegerType, ByteType, ShortType, TimestampType, DateType, DecimalType, DoubleType, ... | PysparkSchemaError) | 259 | 17 | |
unionai-oss/pandera | train | 266 | ff46a36dc7eb0d55187d847df0e7a0f12b523447 | train | tests/pyspark/test_pyspark_check.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_check.py | 634 | 13 | pytest.raises | test_failed_unaccepted_datatypes | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from pyspark.sql.functions import col
from pyspark.sql.types import (
LongType,
StringType,
StructField,
StructType,
IntegerType,
ByteType,
ShortType,
TimestampType,
DateType,
... | TypeError) | modified | ca74da4cfd1200c9083d8782761228a888b07b70ab4a62fcab34679bccfd9bd3 | pytest.raises|test_failed_unaccepted_datatypes|"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from pyspark.sql.functions import col from pyspark.sql.types import ( LongType, StringType, StructField, StructType, IntegerType, ByteType, ShortType, TimestampType, Dat... | TypeError) | 635 | 13 |
unionai-oss/pandera | train | 266 | ff46a36dc7eb0d55187d847df0e7a0f12b523447 | train | tests/pyspark/test_pyspark_check.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_check.py | 912 | 13 | pytest.raises | test_failed_none_expression | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from pyspark.sql.functions import col
from pyspark.sql.types import (
LongType,
StringType,
StructField,
StructType,
IntegerType,
ByteType,
ShortType,
TimestampType,
DateType,
... | ValueError) | modified | a24ade3528a87086f3e793b901a579e3e328781da53699eba6a41cfede2fb935 | pytest.raises|test_failed_none_expression|"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from pyspark.sql.functions import col from pyspark.sql.types import ( LongType, StringType, StructField, StructType, IntegerType, ByteType, ShortType, TimestampType, DateType... | ValueError) | 913 | 13 |
unionai-oss/pandera | train | 266 | ff46a36dc7eb0d55187d847df0e7a0f12b523447 | train | tests/pyspark/test_pyspark_check.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_check.py | 1,070 | 13 | pytest.raises | test_failed_none_expression | """Unit tests for pyspark container."""
# pylint:disable=abstract-method
import datetime
import decimal
from pyspark.sql.functions import col
from pyspark.sql.types import (
LongType,
StringType,
StructField,
StructType,
IntegerType,
ByteType,
ShortType,
TimestampType,
DateType,
... | ValueError) | modified | 8e0f711bb077bda71745e58cf06bc90f6ce635ce9858db9a47192dc8421c4942 | pytest.raises|test_failed_none_expression|"""Unit tests for pyspark container.""" # pylint:disable=abstract-method import datetime import decimal from pyspark.sql.functions import col from pyspark.sql.types import ( LongType, StringType, StructField, StructType, IntegerType, ByteType, ShortType, TimestampType, DateType... | ValueError) | 1,071 | 13 |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_builtin_checks.py | train | unionai-oss/pandera:tests/polars/test_polars_builtin_checks.py | 140 | 17 | pytest.raises | """Unit tests for polars checks."""
# pylint:disable=abstract-method
import datetime
import decimal
import re
from operator import methodcaller
import polars as pl
from polars.datatypes import (
Float32,
Float64,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
Date... | init_exception_cls) | added | 8cd31474f6b74b52c636286feb05221a2b2ec8ba97affa25736c8b17cd3bc1e3 | pytest.raises||"""Unit tests for polars checks.""" # pylint:disable=abstract-method import datetime import decimal import re from operator import methodcaller import polars as pl from polars.datatypes import ( Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Date, Time, Duration, Datetime, Bi... | null | null | null | |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_builtin_checks.py | train | unionai-oss/pandera:tests/polars/test_polars_builtin_checks.py | 159 | 13 | pytest.raises | """Unit tests for polars checks."""
# pylint:disable=abstract-method
import datetime
import decimal
import re
from operator import methodcaller
import polars as pl
from polars.datatypes import (
Float32,
Float64,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
Date... | SchemaError) | added | 002140d4f47bc4da653d068ce61bf04190425cd931445ece23ab6ae89815a22b | pytest.raises||"""Unit tests for polars checks.""" # pylint:disable=abstract-method import datetime import decimal import re from operator import methodcaller import polars as pl from polars.datatypes import ( Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Date, Time, Duration, Datetime, Bi... | null | null | null | |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 52 | 4 | assert | test_polars_column_check | """Unit tests for polars check class."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.backends.polars.constants import CHECK_OUTPUT_KEY
@pytest.fixture
def column_lf():
return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)})
@pytest.fixture
def lf():
return pl.LazyFr... | not invalid_check_result.check_passed.collect().item() | added | 9e06d7e1093dfbbfca332a5a64096a018f961da4beb4b8f0aff07a0a58fbdca4 | assert|test_polars_column_check|"""Unit tests for polars check class.""" import polars as pl import pytest import pandera.polars as pa from pandera.backends.polars.constants import CHECK_OUTPUT_KEY @pytest.fixture def column_lf(): return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)}) @pytest.fixture def lf()... | null | null | null |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 130 | 4 | assert | test_polars_element_wise_column_check | """Unit tests for polars check class."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.backends.polars.constants import CHECK_OUTPUT_KEY
@pytest.fixture
def column_lf():
return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)})
@pytest.fixture
def lf():
return pl.LazyFr... | validated_data.collect().equals(column_lf.collect()) | added | 7eba5ee6111b5f01de6109d89e7218892870eb9b21d0be751c0b476973168cb2 | assert|test_polars_element_wise_column_check|"""Unit tests for polars check class.""" import polars as pl import pytest import pandera.polars as pa from pandera.backends.polars.constants import CHECK_OUTPUT_KEY @pytest.fixture def column_lf(): return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)}) @pytest.fix... | null | null | null |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 365 | 17 | pytest.raises | test_regex_selector | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | pa.errors.SchemaError, match=exception_msg) | modified | c5ed707f7ab56153713485f2ea8a3080c20e98acad2e04e2e8b0e3cf8f4e338f | pytest.raises|test_regex_selector|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataFrameSc... | pa.errors.SchemaError) | 362 | 13 |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_dataframe_generic.py | test | unionai-oss/pandera:tests/polars/test_polars_dataframe_generic.py | 31 | 9 | pytest.raises | test_lazyframe_generic_simple | """Unit tests for polars LazyFrame generic."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.typing.polars import LazyFrame
def test_lazyframe_generic_simple():
class Model(pa.DataFrameModel):
col1: pl.Int64
col2: pl.Utf8
col3: pl.Float64
@pa.check_types... | pa.errors.SchemaError) | added | d8b620b5c7089e9e1d51cb09213f91ecb31e2e4183564ce8e85bd3381bc17c09 | pytest.raises|test_lazyframe_generic_simple|"""Unit tests for polars LazyFrame generic.""" import polars as pl import pytest import pandera.polars as pa from pandera.typing.polars import LazyFrame def test_lazyframe_generic_simple(): class Model(pa.DataFrameModel): col1: pl.Int64 col2: pl.Utf8 col3: pl.Float64 @pa.chec... | null | null | null |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 164 | 4 | assert | test_model_with_custom_dataframe_checks | """Unit tests for polars dataframe model."""
import pytest
import polars as pl
from pandera.errors import SchemaError
from pandera.polars import (
DataFrameModel,
DataFrameSchema,
Column,
PolarsData,
Field,
check,
dataframe_check,
)
@pytest.fixture
def ldf_model_basic():
class BasicM... | isinstance(query, pl.LazyFrame) | added | 043fedc77747b4685f99624e5fb9b8666ed6cdaa73575215fac1c1bd4f75b510 | assert|test_model_with_custom_dataframe_checks|"""Unit tests for polars dataframe model.""" import pytest import polars as pl from pandera.errors import SchemaError from pandera.polars import ( DataFrameModel, DataFrameSchema, Column, PolarsData, Field, check, dataframe_check, ) @pytest.fixture def ldf_model_basic(): c... | null | null | null |
unionai-oss/pandera | train | 267 | 79bcfb205023390a74c728c4e3a9a5be5e3ec9ac | train | tests/polars/test_polars_strategies.py | train | unionai-oss/pandera:tests/polars/test_polars_strategies.py | 11 | 9 | pytest.raises | test_dataframe_schema_strategy | """Unit tests for polars strategy methods."""
import pytest
import pandera.polars as pa
def test_dataframe_schema_strategy():
schema = pa.DataFrameSchema()
with pytest.raises( | NotImplementedError) | added | b590cb53cde614939939394d110c7ac1a01abfb58cab1fb1d9e6aafb3135a323 | pytest.raises|test_dataframe_schema_strategy|"""Unit tests for polars strategy methods.""" import pytest import pandera.polars as pa def test_dataframe_schema_strategy(): schema = pa.DataFrameSchema() with pytest.raises( | null | null | null |
unionai-oss/pandera | train | 268 | 0bd20691de4e1afc2ffccf9908a7cca72fb561c7 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 360 | 8 | assert | test_regex_selector | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | result.equals(ldf_for_regex_match.collect()) | modified | 983113495097344c5206a2775b4d293554baca3b92e42c1450b0d42c429b0d64 | assert|test_regex_selector|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataFrameSchema @p... | result.equals(ldf_for_regex_match.collect()) | 360 | 8 |
unionai-oss/pandera | train | 268 | 0bd20691de4e1afc2ffccf9908a7cca72fb561c7 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 365 | 17 | pytest.raises | test_regex_selector | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | pa.errors.SchemaError, match=exception_msg) | modified | f9074a1bbd977b72b98fb42977638bc87805d4ea9522ce42250f24cd212027e4 | pytest.raises|test_regex_selector|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataFrameSc... | pa.errors.SchemaError, match=exception_msg) | 365 | 17 |
unionai-oss/pandera | train | 268 | 0bd20691de4e1afc2ffccf9908a7cca72fb561c7 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 370 | 13 | pytest.raises | test_regex_selector | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
import polars as pl
import pytest
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | pa.errors.SchemaError) | modified | ad4c57e57125c56d8a1093e1ea8fde408f38f45ac483b7a81480265853b251fe | pytest.raises|test_regex_selector|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataFrameSc... | pa.errors.SchemaError) | 370 | 13 |
unionai-oss/pandera | train | 268 | 0bd20691de4e1afc2ffccf9908a7cca72fb561c7 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 389 | 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
import pandera as pa
from pandera import Check as C
from pandera.api.polars.types import PolarsData
from pandera.polars import Column, DataFrameSchema
@pytest.fixture
def ldf_... | pa.errors.SchemaError) | modified | 2ca9ba82ad50d8576e487d93983d2869d0c083877ec68b18f8abb7f1386403c1 | pytest.raises|test_ordered|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional import polars as pl import pytest import pandera as pa from pandera import Check as C from pandera.api.polars.types import PolarsData from pandera.polars import Column, DataFrameSchema @p... | pa.errors.SchemaError) | 389 | 9 |
unionai-oss/pandera | train | 269 | f395b7a947da54fef6bca7af06eb577cf3622ec0 | train | tests/core/test_validation_depth.py | train | unionai-oss/pandera:tests/core/test_validation_depth.py | 46 | 4 | assert | test_validate_scope | """Unit tests for granular control based on validation depth."""
import pytest
from pandera.backends.base import CoreCheckResult
from pandera.config import CONFIG, ValidationDepth, ValidationScope
from pandera.validation_depth import validate_scope
def custom_backend():
class CustomBackend:
# pylint: d... | expected | added | 11227e79caaa0b89115fb9c3d44c6367de2c3785b388aeaff4116d3221512d66 | assert|test_validate_scope|"""Unit tests for granular control based on validation depth.""" import pytest from pandera.backends.base import CoreCheckResult from pandera.config import CONFIG, ValidationDepth, ValidationScope from pandera.validation_depth import validate_scope def custom_backend(): class CustomBackend: #... | null | null | null |
unionai-oss/pandera | train | 270 | a6270dfb3fb26b483c16c1b9260d45ff736acbde | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,056 | 4 | assert | test_schema_name_override | """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... | "Bar" | modified | 14619d99c6192f5bc9b9bd6ba77596b1edee3c3498fcbf06bffc81eba111f695 | assert|test_schema_name_override|"""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... | "Bar" | 1,053 | 4 |
unionai-oss/pandera | train | 270 | a6270dfb3fb26b483c16c1b9260d45ff736acbde | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,306 | 9 | pytest.raises | test_generic_model_multiple_inheritance | """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) | modified | d65e52e9733298ae6625fa7d98407c831ffb58e417c767d48ab3075d10be922c | pytest.raises|test_generic_model_multiple_inheritance|"""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 panda... | SchemaError) | 1,303 | 9 |
unionai-oss/pandera | train | 270 | a6270dfb3fb26b483c16c1b9260d45ff736acbde | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,360 | 9 | pytest.raises | test_multiple_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, Optional, TypeVar
import pandas as pd
import pytest
import pandera as pa
import p... | SchemaError) | modified | a625a3509d756a81666837879a4a899627a2ea58172351b0b2512ee79ffef737 | pytest.raises|test_multiple_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, Optional, TypeVar import pandas as pd import pyt... | SchemaError) | 1,357 | 9 |
unionai-oss/pandera | train | 270 | a6270dfb3fb26b483c16c1b9260d45ff736acbde | train | tests/core/test_model.py | train | unionai-oss/pandera:tests/core/test_model.py | 1,432 | 4 | assert | test_pandas_fields_metadata | """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 | modified | 4d2ca1ccd31d90e8fbaff7df6dd00aa43d60f829ac5276bbded836c9081bd1ef | assert|test_pandas_fields_metadata|"""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 pyte... | expected | 1,429 | 4 |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/core/test_pydantic.py | train | unionai-oss/pandera:tests/core/test_pydantic.py | 135 | 4 | assert | test_dataframeschema | """Unit tests for pydantic compatibility."""
# pylint:disable=too-few-public-methods,missing-class-docstring
from typing import Optional
import pandas as pd
import pytest
import pandera as pa
from pandera.typing import DataFrame, Series
from pandera.engines import pydantic_version
try:
from pydantic import BaseM... | isinstance( DataFrameSchemaPydantic( pa_schema=pa.DataFrameSchema(), pa_mi=pa.MultiIndex([pa.Index(str), pa.Index(int)]), ), DataFrameSchemaPydantic, ) | modified | a56273e9e9398ad677fa2b178288ad06b88951e321099f2be7804fb689eb1756 | assert|test_dataframeschema|"""Unit tests for pydantic compatibility.""" # pylint:disable=too-few-public-methods,missing-class-docstring from typing import Optional import pandas as pd import pytest import pandera as pa from pandera.typing import DataFrame, Series from pandera.engines import pydantic_version try: from ... | isinstance( DataFrameSchemaPydantic( pa_schema=pa.DataFrameSchema(), pa_mi=pa.MultiIndex([pa.Index(str), pa.Index(int)]), ), DataFrameSchemaPydantic, ) | 135 | 4 |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/core/test_pydantic.py | train | unionai-oss/pandera:tests/core/test_pydantic.py | 155 | 4 | assert | test_seriesschema | """Unit tests for pydantic compatibility."""
# pylint:disable=too-few-public-methods,missing-class-docstring
from typing import Optional
import pandas as pd
import pytest
import pandera as pa
from pandera.typing import DataFrame, Series
from pandera.engines import pydantic_version
try:
from pydantic import BaseM... | isinstance( SeriesSchemaPydantic( pa_series_schema=pa.SeriesSchema(), pa_column=pa.Column(), pa_index=pa.Index(), ), SeriesSchemaPydantic, ) | modified | f2881116783b0a3519b04494b0091787d061b8ef65e4b3049f84b784d1dd68a0 | assert|test_seriesschema|"""Unit tests for pydantic compatibility.""" # pylint:disable=too-few-public-methods,missing-class-docstring from typing import Optional import pandas as pd import pytest import pandera as pa from pandera.typing import DataFrame, Series from pandera.engines import pydantic_version try: from pyd... | isinstance( SeriesSchemaPydantic( pa_series_schema=pa.SeriesSchema(), pa_column=pa.Column(), pa_index=pa.Index(), ), SeriesSchemaPydantic, ) | 155 | 4 |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/geopandas/test_geopandas.py | train | unionai-oss/pandera:tests/geopandas/test_geopandas.py | 202 | 4 | assert_* | test_schema_multiple_geometry_same_crs | """Unit tests for the geopandas integration."""
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import pandas as pd
import geopandas as gpd
import pytest
from shapely.geometry import Polygon, Point
import pandera as ... | data["geometry"]) | modified | 5267e72d95edb6533bc96e80fd4b023966e499dad7e6710dc7cd4767f1103ed3 | assert_*|test_schema_multiple_geometry_same_crs|"""Unit tests for the geopandas integration.""" try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import pandas as pd import geopandas as gpd import pytest from shapely.geometry import... | data["geometry"]) | 202 | 4 |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/geopandas/test_geopandas.py | train | unionai-oss/pandera:tests/geopandas/test_geopandas.py | 301 | 4 | assert | test_schema_no_geometry | """Unit tests for the geopandas integration."""
try: # python 3.9+
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import pandas as pd
import geopandas as gpd
import pytest
from shapely.geometry import Polygon, Point
import pandera as ... | isinstance( GeoDataFrame[Schema]({"name": ["a", "b"]}), gpd.GeoDataFrame ) | modified | 70945773ce4649e4f1674a163916b53a8e8bc1f2545d983eac524a5e935c03ad | assert|test_schema_no_geometry|"""Unit tests for the geopandas integration.""" try: # python 3.9+ from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Polygon, Point i... | isinstance( GeoDataFrame[Schema]({"name": ["a", "b"]}), gpd.GeoDataFrame ) | 301 | 4 |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 293 | 8 | assert | test_drop_invalid_rows | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
import pandera as pa
from pandera import C... | validated_data.collect().equals(expected_valid_data.collect()) | added | 2764c6157d0d27e183a1470051b78549dd67cb0dfeb0171daa65373381b0ddcf | assert|test_drop_invalid_rows|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional try: from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest import pandera as pa from ... | null | null | null |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 458 | 4 | assert | test_dataframe_schema_with_nested_types | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
import pandera as pa
from pandera import C... | validated_lf.collect().equals(lf_with_nested_types.collect()) | added | 65fc891a6d264b2dd614d622bcf5b6299a65e87f6feadac1e518e7829b23ebc3 | assert|test_dataframe_schema_with_nested_types|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional try: from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest import pa... | null | null | null |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 188 | 9 | pytest.raises | test_try_coerce_cast_failed | """Polars dtype tests."""
import decimal
from decimal import Decimal
from typing import Union, Tuple, Sequence
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal
from polars.testing.parametric import dataframes
import polars as pl
... | pandera.errors.ParserError) | added | 2619c49307f507efaddd0920e8e0032ed3b4c35acd61445af18320aa1518a164 | pytest.raises|test_try_coerce_cast_failed|"""Polars dtype tests.""" import decimal from decimal import Decimal from typing import Union, Tuple, Sequence from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing import assert_frame_equal from polars.testing.parametr... | null | null | null |
unionai-oss/pandera | train | 271 | 7d1b1ba2fff4a3819e90c4760a3df692c93417b7 | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 334 | 4 | assert | test_polars_struct_nested_type | """Polars dtype tests."""
import decimal
from decimal import Decimal
from typing import Union, Tuple, Sequence
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal
from polars.testing.parametric import dataframes
import polars as pl
... | pandera_dtype.check(pandera_dtype) | added | 29b2649332341c3c8463de08248ed435f7658225ed5f98417693bf45c4741e04 | assert|test_polars_struct_nested_type|"""Polars dtype tests.""" import decimal from decimal import Decimal from typing import Union, Tuple, Sequence from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing import assert_frame_equal from polars.testing.parametric i... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 223 | 4 | assert | test_required_columns | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
import pandera as pa
from pandera import C... | ldf.pipe(schema.validate).collect().equals(ldf.collect()) | added | e83a5aecfdf269ed0354430a7abee39b66874528366a9c47f123148f99f406f5 | assert|test_required_columns|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional try: from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest import pandera as pa from p... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 266 | 9 | pytest.raises | test_dataframe_level_checks | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
import pandera as pa
from pandera import C... | pa.errors.SchemaError) | added | 5ec54b4b42f7b24d07675adaaa64b91974185cd0acb2860256543c637e457871 | pytest.raises|test_dataframe_level_checks|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional try: from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest import pandera... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 307 | 8 | assert | test_drop_invalid_rows | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
import pandera as pa
from pandera import C... | validated_data.collect().equals(expected_valid_data.collect()) | added | cef2f0bcfef4deab1944f45c35b1fc714da4794e09abebf0e6b6abd27b788e4e | assert|test_drop_invalid_rows|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional try: from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest import pandera as pa from ... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_container.py | train | unionai-oss/pandera:tests/polars/test_polars_container.py | 472 | 4 | assert | test_dataframe_schema_with_nested_types | # pylint: disable=redefined-outer-name
"""Unit tests for polars container."""
from typing import Optional
try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
import polars as pl
import pytest
import pandera as pa
from pandera import C... | validated_lf.collect().equals(lf_with_nested_types.collect()) | added | afcdecd80e80c36927c2f6e8ae26405511c4f88a9241b6669cfe4ae67f681269 | assert|test_dataframe_schema_with_nested_types|# pylint: disable=redefined-outer-name """Unit tests for polars container.""" from typing import Optional try: from typing import Annotated # type: ignore except ImportError: from typing_extensions import Annotated # type: ignore import polars as pl import pytest import pa... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 113 | 4 | assert | test_model_schema_equivalency_with_optional | """Unit tests for polars dataframe model."""
from typing import Optional
import pytest
import polars as pl
from pandera.errors import SchemaError
from pandera.polars import (
DataFrameModel,
DataFrameSchema,
Column,
PolarsData,
Field,
check,
dataframe_check,
)
@pytest.fixture
def ldf_mo... | schema | added | c4e9a5aa1b3185223f66aeedf542445821140f924af0a7932832cb0d652998b6 | assert|test_model_schema_equivalency_with_optional|"""Unit tests for polars dataframe model.""" from typing import Optional import pytest import polars as pl from pandera.errors import SchemaError from pandera.polars import ( DataFrameModel, DataFrameSchema, Column, PolarsData, Field, check, dataframe_check, ) @pytest.... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 137 | 4 | assert | test_basic_model | """Unit tests for polars dataframe model."""
from typing import Optional
import pytest
import polars as pl
from pandera.errors import SchemaError
from pandera.polars import (
DataFrameModel,
DataFrameSchema,
Column,
PolarsData,
Field,
check,
dataframe_check,
)
@pytest.fixture
def ldf_mo... | isinstance(query, pl.LazyFrame) | added | 7e864fffb9e4952cb32279c78b7245ed130f42647aaae4fa58f442707f6aebdc | assert|test_basic_model|"""Unit tests for polars dataframe model.""" from typing import Optional import pytest import polars as pl from pandera.errors import SchemaError from pandera.polars import ( DataFrameModel, DataFrameSchema, Column, PolarsData, Field, check, dataframe_check, ) @pytest.fixture def ldf_model_basic... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 171 | 9 | pytest.raises | test_model_with_custom_column_checks | """Unit tests for polars dataframe model."""
from typing import Optional
import pytest
import polars as pl
from pandera.errors import SchemaError
from pandera.polars import (
DataFrameModel,
DataFrameSchema,
Column,
PolarsData,
Field,
check,
dataframe_check,
)
@pytest.fixture
def ldf_mo... | SchemaError) | added | 97ae551d728f4acd72859d4a1b44a2f1055a6188be102234a0094d996d4b9263 | pytest.raises|test_model_with_custom_column_checks|"""Unit tests for polars dataframe model.""" from typing import Optional import pytest import polars as pl from pandera.errors import SchemaError from pandera.polars import ( DataFrameModel, DataFrameSchema, Column, PolarsData, Field, check, dataframe_check, ) @pytest.... | null | null | null |
unionai-oss/pandera | train | 272 | 1307b1bf795569dbc3203bfeb3e9934da31b401f | train | tests/polars/test_polars_model.py | train | unionai-oss/pandera:tests/polars/test_polars_model.py | 186 | 9 | pytest.raises | test_model_with_custom_dataframe_checks | """Unit tests for polars dataframe model."""
from typing import Optional
import pytest
import polars as pl
from pandera.errors import SchemaError
from pandera.polars import (
DataFrameModel,
DataFrameSchema,
Column,
PolarsData,
Field,
check,
dataframe_check,
)
@pytest.fixture
def ldf_mo... | SchemaError) | added | f35f4542b45657a975a7a23dc16b12f56a2f819148026735c0541c3cff006f26 | pytest.raises|test_model_with_custom_dataframe_checks|"""Unit tests for polars dataframe model.""" from typing import Optional import pytest import polars as pl from pandera.errors import SchemaError from pandera.polars import ( DataFrameModel, DataFrameSchema, Column, PolarsData, Field, check, dataframe_check, ) @pyte... | null | null | null |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/core/test_config.py | train | unionai-oss/pandera:tests/core/test_config.py | 64 | 4 | assert | test_config_context | """Tests for configuration functions."""
import pytest
from pandera.config import (
config_context,
get_config_global,
get_config_context,
ValidationDepth,
)
@pytest.mark.parametrize(
"setting, value, in_ctx_value, post_global_value, post_ctx_value",
[
("validation_enabled", False, F... | post_ctx_value | added | fccba0dfc0f029a1b8ab746ad4a88c641892885650379a0b46dfe4add165092d | assert|test_config_context|"""Tests for configuration functions.""" import pytest from pandera.config import ( config_context, get_config_global, get_config_context, ValidationDepth, ) @pytest.mark.parametrize( "setting, value, in_ctx_value, post_global_value, post_ctx_value", [ ("validation_enabled", False, False, Tru... | null | null | null |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/core/test_errors.py | train | unionai-oss/pandera:tests/core/test_errors.py | 317 | 8 | assert | test_pickling_parser_error | """Test pickling behavior of SchemaError and SchemaErrors.
See issue #713:
In a multiprocessing or concurrent.futures.ProcessPoolExecutor
situation if a subprocess does not handle the SchemaError itself, it is pickled
and piped back to the main process. This requires picklability, and limits the
pickled size to 2 GiB.... | str(exc) | modified | 418ffba4c04f91387db167a062b099f0b4e191dce91fa24e02d04508a40b8ca8 | assert|test_pickling_parser_error|"""Test pickling behavior of SchemaError and SchemaErrors. See issue #713: In a multiprocessing or concurrent.futures.ProcessPoolExecutor situation if a subprocess does not handle the SchemaError itself, it is pickled and piped back to the main process. This requires picklability, and ... | str(exc) | 317 | 8 |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/core/test_pandas_config.py | train | unionai-oss/pandera:tests/core/test_pandas_config.py | 52 | 8 | 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,redefined-outer-name
import pandas as pd
import pytest
import pandera as pa
from pandera import DataFrameModel, DataFrameSchema, SeriesSchema
from pandera.config import config... | expected | added | ed949f051b83c3301cdb4ef2b3127a7eed15688d03ece9ca910d7dc924ea02f4 | 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,redefined-outer-name import pandas as pd import pytest import pandera as pa from pandera import DataFrameModel, DataFrameSchema, SeriesSchema from ... | null | null | null |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/core/test_validation_depth.py | train | unionai-oss/pandera:tests/core/test_validation_depth.py | 46 | 8 | assert | test_validate_scope | """Unit tests for granular control based on validation depth."""
import pytest
from pandera.backends.base import CoreCheckResult
from pandera.config import config_context, ValidationDepth, ValidationScope
from pandera.validation_depth import validate_scope
def custom_backend():
class CustomBackend:
# p... | expected | modified | 82726cc9c4051593a73d39defbbb04db9f6e0a152efa5304d4d28227554b0422 | assert|test_validate_scope|"""Unit tests for granular control based on validation depth.""" import pytest from pandera.backends.base import CoreCheckResult from pandera.config import config_context, ValidationDepth, ValidationScope from pandera.validation_depth import validate_scope def custom_backend(): class CustomBa... | expected | 46 | 4 |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/polars/test_polars_check.py | train | unionai-oss/pandera:tests/polars/test_polars_check.py | 48 | 4 | assert | test_polars_column_check | """Unit tests for polars check class."""
import polars as pl
import pytest
import pandera.polars as pa
from pandera.constants import CHECK_OUTPUT_KEY
@pytest.fixture
def column_lf():
return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)})
@pytest.fixture
def lf():
return pl.LazyFrame(
{
... | check_result.check_passed.collect().item() | modified | 0a986f69b27ad6dcca5838d4132a4330906a7f71e84ef326e3b497d8e8417974 | assert|test_polars_column_check|"""Unit tests for polars check class.""" import polars as pl import pytest import pandera.polars as pa from pandera.constants import CHECK_OUTPUT_KEY @pytest.fixture def column_lf(): return pl.LazyFrame({"col": pl.Series([1, 2, 3, 4], dtype=int)}) @pytest.fixture def lf(): return pl.Lazy... | check_result.check_passed.collect().item() | 48 | 4 |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/polars/test_polars_config.py | train | unionai-oss/pandera:tests/polars/test_polars_config.py | 139 | 9 | pytest.raises | test_lazyframe_validation_depth_schema_and_data | # pylint: disable=unused-argument
"""Unit tests for polars validation based on configuration settings."""
import pytest
import polars as pl
import pandera.polars as pa
from pandera.api.base.error_handler import ErrorCategory
from pandera.config import (
CONFIG,
ValidationDepth,
config_context,
get_co... | pa.errors.SchemaError, match="Column 'a' failed validator .+ <Check greater_than") | added | 5d5c03afadc60a5519e0a4401241c9bf6f02645ef8c5304db9777c9f3dc03ebc | pytest.raises|test_lazyframe_validation_depth_schema_and_data|# pylint: disable=unused-argument """Unit tests for polars validation based on configuration settings.""" import pytest import polars as pl import pandera.polars as pa from pandera.api.base.error_handler import ErrorCategory from pandera.config import ( CONF... | null | null | null |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/polars/test_polars_dtypes.py | train | unionai-oss/pandera:tests/polars/test_polars_dtypes.py | 188 | 9 | pytest.raises | test_try_coerce_cast_failed | """Polars dtype tests."""
import decimal
from decimal import Decimal
from typing import Union, Tuple, Sequence
from hypothesis import strategies as st, settings
import pytest
from hypothesis import given
from polars.testing import assert_frame_equal
from polars.testing.parametric import dataframes
import polars as pl
... | pandera.errors.ParserError) | modified | d55e92f8540a411cc4987182742fb1a1c44532210fe3e3df300195acc98de86b | pytest.raises|test_try_coerce_cast_failed|"""Polars dtype tests.""" import decimal from decimal import Decimal from typing import Union, Tuple, Sequence from hypothesis import strategies as st, settings import pytest from hypothesis import given from polars.testing import assert_frame_equal from polars.testing.parametr... | pandera.errors.ParserError) | 188 | 9 |
unionai-oss/pandera | train | 273 | d95c0688c6dc52f7d2f7e360fe9780842e21e5ff | train | tests/pyspark/test_pyspark_decorators.py | train | unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py | 125 | 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
from contextlib import nullcontext as does_not_raise
import logging
import pyspark.sql.types as T
from pyspark.sql import DataFrame
import pytest
from pandera.backends.pyspark.... | caplog.text | modified | 1a11cd86e766295250d481f1f5527a361ea53fbb91c17ab0c27acbcaab74da67 | 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 from contextlib import nullcontext as does_not_raise import logging import pyspark.sql.types as T from pyspark.sql import DataFrame import py... | caplog.text | 124 | 12 |
unionai-oss/pandera | train | 274 | 645f5e574f9d5ffa23d942f0b834fb4ba12c90b8 | train | tests/core/test_config.py | train | unionai-oss/pandera:tests/core/test_config.py | 113 | 8 | assert | test_nested_config_context | """Tests for configuration functions."""
import pytest
from pandera.config import (
config_context,
get_config_global,
get_config_context,
ValidationDepth,
)
@pytest.mark.parametrize(
"setting, value, in_ctx_value, post_global_value, post_ctx_value",
[
("validation_enabled", False, F... | outer_value | added | b6ea16e8d46924f3b3e7e78736c63e55abab19c519fb48e0c3359f9d557719ce | assert|test_nested_config_context|"""Tests for configuration functions.""" import pytest from pandera.config import ( config_context, get_config_global, get_config_context, ValidationDepth, ) @pytest.mark.parametrize( "setting, value, in_ctx_value, post_global_value, post_ctx_value", [ ("validation_enabled", False, Fal... | null | null | null |
unionai-oss/pandera | train | 274 | 645f5e574f9d5ffa23d942f0b834fb4ba12c90b8 | train | tests/core/test_config.py | train | unionai-oss/pandera:tests/core/test_config.py | 117 | 12 | assert | test_nested_config_context | """Tests for configuration functions."""
import pytest
from pandera.config import (
config_context,
get_config_global,
get_config_context,
ValidationDepth,
)
@pytest.mark.parametrize(
"setting, value, in_ctx_value, post_global_value, post_ctx_value",
[
("validation_enabled", False, F... | inner_value | added | b94ac5d74e2fc0df24616c079178054dc00a98c12d87b07326b8905ba1fb5fdc | assert|test_nested_config_context|"""Tests for configuration functions.""" import pytest from pandera.config import ( config_context, get_config_global, get_config_context, ValidationDepth, ) @pytest.mark.parametrize( "setting, value, in_ctx_value, post_global_value, post_ctx_value", [ ("validation_enabled", False, Fal... | null | null | null |
unionai-oss/pandera | train | 274 | 645f5e574f9d5ffa23d942f0b834fb4ba12c90b8 | train | tests/core/test_config.py | train | unionai-oss/pandera:tests/core/test_config.py | 120 | 8 | assert | test_nested_config_context | """Tests for configuration functions."""
import pytest
from pandera.config import (
config_context,
get_config_global,
get_config_context,
ValidationDepth,
)
@pytest.mark.parametrize(
"setting, value, in_ctx_value, post_global_value, post_ctx_value",
[
("validation_enabled", False, F... | outer_value | added | 4c9d5a05bce9dcc3099750a32c8fc2a6e71ec16d7459034e5d9a7ded79448124 | assert|test_nested_config_context|"""Tests for configuration functions.""" import pytest from pandera.config import ( config_context, get_config_global, get_config_context, ValidationDepth, ) @pytest.mark.parametrize( "setting, value, in_ctx_value, post_global_value, post_ctx_value", [ ("validation_enabled", False, Fal... | null | null | null |
unionai-oss/pandera | train | 275 | 4513b91ecbb5511144ada96627a099883cad2e0e | train | tests/core/test_from_to_format_conversions.py | train | unionai-oss/pandera:tests/core/test_from_to_format_conversions.py | 216 | 17 | pytest.raises | test_from_format | # pylint: disable=missing-class-docstring,too-few-public-methods
"""Test conversion of data from and to different formats."""
import io
import tempfile
from typing import Any
import pandas as pd
import pytest
import pandera as pa
from pandera.engines import pandas_engine
class InSchema(pa.DataFrameModel):
str_... | ImportError) | added | 28746a72e02936ae18816dd32fdf464473eceb105eee4f66357421be0b300441 | pytest.raises|test_from_format|# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of data from and to different formats.""" import io import tempfile from typing import Any import pandas as pd import pytest import pandera as pa from pandera.engines import pandas_engine class InSchema(pa... | null | null | null |
unionai-oss/pandera | train | 275 | 4513b91ecbb5511144ada96627a099883cad2e0e | train | tests/core/test_from_to_format_conversions.py | train | unionai-oss/pandera:tests/core/test_from_to_format_conversions.py | 235 | 12 | assert | test_from_format | # pylint: disable=missing-class-docstring,too-few-public-methods
"""Test conversion of data from and to different formats."""
import io
import tempfile
from typing import Any
import pandas as pd
import pytest
import pandera as pa
from pandera.engines import pandas_engine
class InSchema(pa.DataFrameModel):
str_... | df.equals(out) | added | f333a5759737cdcaa1d73ffa660cd776e2da1ede05f3c438ab8164f2abfce566 | assert|test_from_format|# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of data from and to different formats.""" import io import tempfile from typing import Any import pandas as pd import pytest import pandera as pa from pandera.engines import pandas_engine class InSchema(pa.DataFr... | null | null | null |
unionai-oss/pandera | train | 275 | 4513b91ecbb5511144ada96627a099883cad2e0e | train | tests/core/test_from_to_format_conversions.py | train | unionai-oss/pandera:tests/core/test_from_to_format_conversions.py | 282 | 13 | pytest.raises | test_to_format | # pylint: disable=missing-class-docstring,too-few-public-methods
"""Test conversion of data from and to different formats."""
import io
import tempfile
from typing import Any
import pandas as pd
import pytest
import pandera as pa
from pandera.engines import pandas_engine
class InSchema(pa.DataFrameModel):
str_... | ImportError) | added | a96459a9d8ff28cdfece708df22cf836c0fe4c09b810d1d9fd94dae10d088a11 | pytest.raises|test_to_format|# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of data from and to different formats.""" import io import tempfile from typing import Any import pandas as pd import pytest import pandera as pa from pandera.engines import pandas_engine class InSchema(pa.D... | null | null | null |
unionai-oss/pandera | train | 275 | 4513b91ecbb5511144ada96627a099883cad2e0e | train | tests/core/test_from_to_format_conversions.py | train | unionai-oss/pandera:tests/core/test_from_to_format_conversions.py | 297 | 4 | assert | test_to_format | # pylint: disable=missing-class-docstring,too-few-public-methods
"""Test conversion of data from and to different formats."""
import io
import tempfile
from typing import Any
import pandas as pd
import pytest
import pandera as pa
from pandera.engines import pandas_engine
class InSchema(pa.DataFrameModel):
str_... | df.assign(float_col=1.1).equals(out_df) | added | 980eada72d5267668bca736d22638fad1865966e8611c869a0ae56fc3330d0ca | assert|test_to_format|# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of data from and to different formats.""" import io import tempfile from typing import Any import pandas as pd import pytest import pandera as pa from pandera.engines import pandas_engine class InSchema(pa.DataFram... | null | null | null |
unionai-oss/pandera | train | 276 | f10ac6034780dd3e00aade714093d523b161ecc5 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 852 | 13 | pytest.raises | test_python_typing_handle_empty_list_dict_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
i... | pa.errors.SchemaError) | added | e595357bd1ca14e2fd6ebd0006da50cb4604700b8e636aae160e369a21f4e0a9 | pytest.raises|test_python_typing_handle_empty_list_dict_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-obj... | null | null | null |
unionai-oss/pandera | train | 276 | f10ac6034780dd3e00aade714093d523b161ecc5 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 906 | 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
i... | Model.validate(data).equals(expected) | added | 5584cb35be24ee1d36c50d4ea4514d396788416020fafcb3c8d0787ae33aed70 | 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 | 276 | f10ac6034780dd3e00aade714093d523b161ecc5 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 908 | 13 | pytest.raises | 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
i... | pa.errors.SchemaError) | added | ef2d6a3380f04d28f31b68167ef4d05d28617ba3b6002a65b3194bacb964b8e1 | pytest.raises|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... | null | null | null |
unionai-oss/pandera | train | 276 | f10ac6034780dd3e00aade714093d523b161ecc5 | train | tests/core/test_dtypes.py | train | unionai-oss/pandera:tests/core/test_dtypes.py | 938 | 12 | assert | test_python_std_list_dict_error | """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
i... | { "foo": 1, "bar": "2", } | added | 85ac869d76a25083c4f89a732e4267e504c18dd244c272fe16433569f4bdd9c9 | assert|test_python_std_list_dict_error|"""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 imp... | null | null | null |
unionai-oss/pandera | train | 277 | 58c5e45e3dbee6f48d34260b4acdd5d3af072eab | train | tests/core/test_pandas_parallel.py | test | unionai-oss/pandera:tests/core/test_pandas_parallel.py | 16 | 8 | assert | test_polars_parallel | """Test parallelization with pandas using joblib."""
import pandas as pd
from joblib import Parallel, delayed
from pandera import Column, DataFrameSchema
def test_polars_parallel():
def fn():
schema = DataFrameSchema({"a": Column("int64")}, coerce=True)
return schema.validate(pd.DataFrame({"a": [... | "int64" | added | b185bae51c37cff0eb15c69a6358c3cb6480bf9698ca89c40300bc28db6174f9 | assert|test_polars_parallel|"""Test parallelization with pandas using joblib.""" import pandas as pd from joblib import Parallel, delayed from pandera import Column, DataFrameSchema def test_polars_parallel(): def fn(): schema = DataFrameSchema({"a": Column("int64")}, coerce=True) return schema.validate(pd.DataFrame({"... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.