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
238
6c3efcced1d3161a8b3bb048a013ebed54862de8
train
tests/core/test_checks.py
train
unionai-oss/pandera:tests/core/test_checks.py
504
9
pytest.raises
test_check_backend_not_found
"""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...
KeyError, match="Backend not found for class")
added
0ab11c6a2444e955b7be1f18bb2a830bd738a0917711ef8c680bcfff952df2f2
pytest.raises|test_check_backend_not_found|"""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_checks(...
null
null
null
unionai-oss/pandera
train
238
6c3efcced1d3161a8b3bb048a013ebed54862de8
train
tests/core/test_checks_builtin.py
train
unionai-oss/pandera:tests/core/test_checks_builtin.py
60
4
assert
"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.api.pandas.container import Data...
series
modified
7e2a03bb6fd4151a4e6ddde9d6d65c256ba142deb105902cb0b51f90b8df72d4
assert||"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.api.pandas.container import...
series
60
4
unionai-oss/pandera
train
238
6c3efcced1d3161a8b3bb048a013ebed54862de8
train
tests/core/test_checks_builtin.py
train
unionai-oss/pandera:tests/core/test_checks_builtin.py
682
13
pytest.raises
test_argument_check
"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.api.pandas.container import Data...
ValueError)
added
476cf14cb0fa8fe8fc743079c85b3056faa3bea263a9cd27ea794dff30e047b3
pytest.raises|test_argument_check|"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.a...
null
null
null
unionai-oss/pandera
train
238
6c3efcced1d3161a8b3bb048a013ebed54862de8
train
tests/core/test_checks_builtin.py
train
unionai-oss/pandera:tests/core/test_checks_builtin.py
1,041
9
pytest.raises
test_unique_values_eq_raise_error
"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.api.pandas.container import Data...
(TypeError, ValueError))
added
0b868b4c130486504f990edd09bbb030eaf9be054884944f2e2f9b4dbad4978f
pytest.raises|test_unique_values_eq_raise_error|"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column ...
null
null
null
unionai-oss/pandera
train
238
6c3efcced1d3161a8b3bb048a013ebed54862de8
train
tests/core/test_checks_builtin.py
train
unionai-oss/pandera:tests/core/test_checks_builtin.py
1,060
4
assert
test_check_pickling
"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.api.pandas.container import Data...
loaded_check(valid_data).check_passed
modified
fe719607c25422587fca164ed7816a1c3ad079913ed2e080b0091b955271381e
assert|test_check_pickling|"""Tests for builtin checks in pandera.api.checks.Check """ import pickle from typing import Iterable import pandas as pd import pytest from pandera.api.checks import Check from pandera.api.pandas.array import SeriesSchema from pandera.api.pandas.components import Column from pandera.api.pand...
not loaded_check(invalid_data).check_passed
1,057
4
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
303
9
pytest.raises
test_invalid_pandas_extension_dtype
"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter import dataclasses import datetime import inspect import re import sys from decimal import Decimal fr...
TypeError)
modified
ef9be702b2f76ca757089024158c46dec10df63f800c0b72e7b385cfdff74fd8
pytest.raises|test_invalid_pandas_extension_dtype|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter import dataclasses import datetime import inspect i...
TypeError)
303
9
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
519
4
assert
test_default_numeric_dtypes
"""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 import dataclasses import datetime import inspect import re import sys from decimal import Decimal fr...
pandas_engine.Engine.dtype(complex)
modified
0b3c93b84af1b7860d856c4fc35b7448c920ed63901ba7b46a7e9f4144db251b
assert|test_default_numeric_dtypes|"""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 import dataclasses import datetime import inspect import re import...
pandas_engine.Engine.dtype(complex)
519
4
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
611
4
assert
test_is_int
"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter import dataclasses import datetime import inspect import re import sys from decimal import Decimal fr...
expected
modified
b4526a008c13e2baee69c0f1ca0ce47303e1284062d0a27d7103e45bb8270cba
assert|test_is_int|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter import dataclasses import datetime import inspect import re import sys from decima...
expected
611
4
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
671
4
assert
test_is_string
"""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 import dataclasses import datetime import inspect import re import sys from decimal import Decimal fr...
expected
modified
879886a07dff0e778fe64ab6bb292eed481caaf02e201e1986dae0c507c6d2db
assert|test_is_string|"""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 import dataclasses import datetime import inspect import re import sys from dec...
expected
671
4
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_pydantic.py
train
unionai-oss/pandera:tests/core/test_pydantic.py
79
9
pytest.raises
test_invalid_typed_dataframe
"""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.utils import pydantic_version try: from pydantic import...
ValueError)
added
3119ce0bfac1c817697a173dbfbad6df1ebabc5364ea094a026dbd12b9b3c55c
pytest.raises|test_invalid_typed_dataframe|"""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.utils import pydant...
null
null
null
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_pydantic.py
train
unionai-oss/pandera:tests/core/test_pydantic.py
85
4
assert
test_dataframemodel
"""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.utils import pydantic_version try: from pydantic import...
isinstance( DataFrameModelPydantic(pa_schema=SimpleSchema), DataFrameModelPydantic, )
added
d90c81b866e0df0470fe62edaebe739163884dfe434f1feda7f79c512a179baf
assert|test_dataframemodel|"""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.utils import pydantic_version try: ...
null
null
null
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
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.utils import pydantic_version try: from pydantic import...
isinstance( SeriesSchemaPydantic( pa_series_schema=pa.SeriesSchema(), pa_column=pa.Column(), pa_index=pa.Index(), ), SeriesSchemaPydantic, )
added
44479732a2f3b8bd44c8b8f6ebd055fb6d9d9bebe395861c46672b860ce5eb88
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.utils import pydantic_version try: fr...
null
null
null
unionai-oss/pandera
train
239
850dcf8e59632d54bc9a6df47b9ca08afa089a27
train
tests/core/test_pydantic.py
train
unionai-oss/pandera:tests/core/test_pydantic.py
173
9
pytest.raises
test_invalid_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.utils import pydantic_version try: from pydantic import...
TypeError if PYDANTIC_V2 else ValidationError)
added
3df00b34878d8331f56c2478fcd260f530690ac6a60110a8551c83284bd24783
pytest.raises|test_invalid_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.utils import pydantic_...
null
null
null
unionai-oss/pandera
train
240
c240b1bf015ffbb41c6b6c94471729bc507ce9e9
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
81
8
assert
test_mypy_pandas_dataframe
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
expected["errcode"]
modified
e93b27da290e72b88d76bb24fc43ec8d143900aa68102b78acfb1b4c649a7d5a
assert|test_mypy_pandas_dataframe|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess imp...
expected["msg"] == error["msg"] or re.match( expected["msg"], error["msg"] )
78
8
unionai-oss/pandera
train
240
c240b1bf015ffbb41c6b6c94471729bc507ce9e9
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
102
8
assert
test_pandera_runtime_errors
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
"age"
added
0ace71eddef84586eea0482651ad9deb52b4bef7eb84aca792d107bd3a6b07a4
assert|test_pandera_runtime_errors|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess im...
null
null
null
unionai-oss/pandera
train
240
c240b1bf015ffbb41c6b6c94471729bc507ce9e9
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
200
4
assert
test_pandas_stubs_false_positives
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
len(resulting_errors)
added
f504086706fde991c5dbc9e9070bb7e06b46766f01af7a9598f4ad61afe45f6f
assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc...
null
null
null
unionai-oss/pandera
train
240
c240b1bf015ffbb41c6b6c94471729bc507ce9e9
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
203
8
assert
test_pandas_stubs_false_positives
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
expected["msg"] == error["msg"] or re.match( expected["msg"], error["msg"] )
added
1e4b853938701ca505d99ebb2edec702471a44743ab2d9a61f871d54c3891ba2
assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc...
null
null
null
unionai-oss/pandera
train
241
4f9ef29dd9c397d27fc0d638677fab362208451a
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
287
4
assert
test_datatype_call
"""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...
["1", "2", "3", "4", "5"]
modified
e5a76707d498c051154f1d77a5ae7f14a766560af5a5530926d7e5f0392c8415
assert|test_datatype_call|"""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 ...
["1", "2", "3", "4", "5"]
286
4
unionai-oss/pandera
train
241
4f9ef29dd9c397d27fc0d638677fab362208451a
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
490
4
assert
test_coerce_dt
"""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...
expected
modified
35e6cf0776937a4f07e09c24a5ebe0a8a89c2de485a48ad06ffafdcd550a852d
assert|test_coerce_dt|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import dataclasses import datetime impo...
expected
489
4
unionai-oss/pandera
train
241
4f9ef29dd9c397d27fc0d638677fab362208451a
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
497
4
assert
test_coerce_string
"""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...
isinstance(coerced[0], str)
modified
7f2a475a5698a5e4a73b8d66fe231fc100540dbf6a1938ab0aaa1f064de557a7
assert|test_coerce_string|"""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 ...
isinstance(coerced[0], str)
496
4
unionai-oss/pandera
train
241
4f9ef29dd9c397d27fc0d638677fab362208451a
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
707
4
assert
test_pandera_timedelta_dtype
"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import dataclasses import datetime import inspect import re i...
"timedelta"
modified
4a9d4ffd537b3cda37ad6f40a471057c52a57e63a0dca28d093c31357ff813a9
assert|test_pandera_timedelta_dtype|"""Tests a variety of python and pandas dtypes, and tests some specific coercion examples.""" # pylint doesn't know about __init__ generated with dataclass # pylint:disable=unexpected-keyword-arg,no-value-for-parameter # pylint:disable=unsubscriptable-object import dataclasses import...
"timedelta"
706
4
unionai-oss/pandera
train
242
d46b3b94a76fae77d3825670fc2e0c5ffc67db2f
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
826
8
assert
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...
validated_data.equals(expected)
modified
729c3ae124bd00e9a3961a4aa20d8935f9ba3344b852b8ccbaca59529534ca10
assert|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 imp...
validated_data.equals(expected)
826
8
unionai-oss/pandera
train
242
d46b3b94a76fae77d3825670fc2e0c5ffc67db2f
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
828
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)
modified
11a5b1c799de8fb3c1102b5acc5c775ac702564c56e6cac22c3db04434110c03
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...
pa.errors.SchemaError)
828
13
unionai-oss/pandera
train
242
d46b3b94a76fae77d3825670fc2e0c5ffc67db2f
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
877
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)
modified
d388ebb5a09efbfef559d3a28a971c3238e3571faeeb02ff6b9310c58af88230
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...
pa.errors.SchemaError)
877
13
unionai-oss/pandera
train
242
d46b3b94a76fae77d3825670fc2e0c5ffc67db2f
train
tests/core/test_dtypes.py
train
unionai-oss/pandera:tests/core/test_dtypes.py
900
8
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
c75314f0cbd859cd340a63df757a0a1cefe871433fcf9b83ab4daf08a945e8fb
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
243
4425ad8012342960c98f673206a4149ce4cd22dc
train
tests/core/test_schemas.py
test
unionai-oss/pandera:tests/core/test_schemas.py
670
4
assert
test_series_schema_with_index
"""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 py...
(validated_series_multiindex.index == multi_index).all()
added
6b7f7b2556e49b7f9760b7a199a0aee9255bcf07024ef90edb192d894457e99a
assert|test_series_schema_with_index|"""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
243
4425ad8012342960c98f673206a4149ce4cd22dc
train
tests/core/test_schemas.py
test
unionai-oss/pandera:tests/core/test_schemas.py
881
4
assert
test_head_dataframe_schema
"""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 py...
schema.validate(df, head=100).equals(df)
added
f23d5bd6ab74e6252d4629e963f876e7eb5c497e0a6472b48846ed71bbd7f00e
assert|test_head_dataframe_schema|"""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 ...
null
null
null
unionai-oss/pandera
train
243
4425ad8012342960c98f673206a4149ce4cd22dc
train
tests/core/test_schemas.py
test
unionai-oss/pandera:tests/core/test_schemas.py
1,376
8
assert
test_lazy_dataframe_validation_nullable
"""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 py...
err.failure_cases.query("check == 'not_nullable'") .failure_case.isna() .all()
added
ff57604c0cb856ffec75654e3a02680c093b088d100f47602b2a1e5505e321ad
assert|test_lazy_dataframe_validation_nullable|"""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 imp...
null
null
null
unionai-oss/pandera
train
243
4425ad8012342960c98f673206a4149ce4cd22dc
train
tests/core/test_schemas.py
test
unionai-oss/pandera:tests/core/test_schemas.py
1,473
8
assert_*
test_lazy_dataframe_validation_nullable_with_checks
"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, Type, Union import numpy as np import pandas as pd import py...
expected_failure_cases)
added
aac30307361950bc88dc2768e87c875e70e7b15a02073d72b8ab595ea3aefcfa
assert_*|test_lazy_dataframe_validation_nullable_with_checks|"""Testing creation and manipulation of DataFrameSchema objects.""" # pylint: disable=too-many-lines,redefined-outer-name import copy from datetime import datetime, timedelta from functools import partial from typing import Any, Callable, Dict, List, Tuple, T...
null
null
null
unionai-oss/pandera
train
244
0c4877871f856207f2e53f100ade96d939073cf5
train
tests/pyspark/test_pyspark_dtypes.py
val
unionai-oss/pandera:tests/pyspark/test_pyspark_dtypes.py
60
16
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.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pandera.backends.pyspark.decorator...
False
modified
a49e03c09c9565dad1780aa89a919129ae109fff2d95b7e7c774eacf28bf19d9
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.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pandera.backends.pyspark.dec...
False
59
16
unionai-oss/pandera
train
244
0c4877871f856207f2e53f100ade96d939073cf5
train
tests/pyspark/test_pyspark_dtypes.py
val
unionai-oss/pandera:tests/pyspark/test_pyspark_dtypes.py
183
8
assert
test_pyspark_decimal_parameterized_types
"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pandera.backends.pyspark.decorator...
{ "WRONG_DATATYPE": [ { "schema": None, "column": "price", "check": "dtype('DecimalType(20,3)')", "error": "expected column 'price' to have type DecimalType(20,3), " "got DecimalType(20,5)", } ] }
modified
aa97c076e5bc0b92c1f30e6266a0c99c0b8899498f515344f11ed52f259cd271
assert|test_pyspark_decimal_parameterized_types|"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import Pandera...
{ "WRONG_DATATYPE": [ { "schema": None, "column": "price", "check": "dtype('DecimalType(20,3)')", "error": "expected column 'price' to have type DecimalType(20,3), " "got DecimalType(20,5)", } ] }
182
8
unionai-oss/pandera
train
244
0c4877871f856207f2e53f100ade96d939073cf5
train
tests/pyspark/test_pyspark_dtypes.py
val
unionai-oss/pandera:tests/pyspark/test_pyspark_dtypes.py
372
8
assert
test_pyspark_array_type
"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pandera.backends.pyspark.decorator...
{ "WRONG_DATATYPE": [ { "schema": None, "column": "customer_details", "check": f"dtype('{str(T.ArrayType(T.ArrayType(T.IntegerType(), True), True))}')", "error": f"expected column 'customer_details' to have type {str(T.ArrayType(T.ArrayType(T.IntegerType(), True), True))}, got {str(T.ArrayType(T.ArrayType(T.StringType(...
added
700d38190f425320450f8aff3060399706270c909c08f1f68a1788995e819cf7
assert|test_pyspark_array_type|"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pande...
null
null
null
unionai-oss/pandera
train
244
0c4877871f856207f2e53f100ade96d939073cf5
train
tests/pyspark/test_pyspark_dtypes.py
val
unionai-oss/pandera:tests/pyspark/test_pyspark_dtypes.py
394
8
assert
test_pyspark_map_type
"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pandera.backends.pyspark.decorator...
{ "WRONG_DATATYPE": [ { "schema": None, "column": "product_details", "check": f"dtype('{str(T.MapType(T.StringType(), T.IntegerType(), True))}')", "error": f"expected column 'product_details' to have type {str(T.MapType(T.StringType(), T.IntegerType(), True))}, got {str(T.MapType(T.StringType(), T.StringType(), True))}...
added
eed0ca02749e455f48d1e5891fe3a22913a5e91a2f554fb2c2c317e6364b3ceb
assert|test_pyspark_map_type|"""Unit tests for pyspark container.""" from typing import Any import pyspark import pyspark.sql.types as T from pyspark.sql import DataFrame from pandera.pyspark import DataFrameSchema, Column from tests.pyspark.conftest import spark_df from pandera.config import PanderaConfig from pandera...
null
null
null
unionai-oss/pandera
train
245
cf6b5e45dfb0cd593f948b12a2a327bbf3699657
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
325
4
assert
test_optional_column
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config import PanderaConfig, ValidationDe...
not schema.columns[ "b" ].required
added
98d81e3b0a637706836aad489f6c7a2c5ad7b54bafdf24144786f686c3f1ce73
assert|test_optional_column|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config import P...
null
null
null
unionai-oss/pandera
train
245
cf6b5e45dfb0cd593f948b12a2a327bbf3699657
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
328
4
assert
test_optional_column
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config import PanderaConfig, ValidationDe...
not schema.columns[ "c" ].required
added
e89e50410638556c4133f7f344485113a4dd3692cf9be1c3ec657b217cd7e5b6
assert|test_optional_column|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config import P...
null
null
null
unionai-oss/pandera
train
245
cf6b5e45dfb0cd593f948b12a2a327bbf3699657
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
361
9
pytest.raises
test_invalid_field
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config import PanderaConfig, ValidationDe...
pandera.errors.SchemaInitError, match="'a' can only be assigned a 'Field'")
added
522c1e6ec63784154a5412ec20f8d7beb56c836344e960b65364b2502ce5fce5
pytest.raises|test_invalid_field|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config imp...
null
null
null
unionai-oss/pandera
train
245
cf6b5e45dfb0cd593f948b12a2a327bbf3699657
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
395
4
assert
test_registered_dataframemodel_checks
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pandera.config import PanderaConfig, ValidationDe...
not out.pandera.errors
added
9cd7d6b20cbc4af00aec1a9fd4abf394a0ca93661f8547f26ea12dbd18f0b540
assert|test_registered_dataframemodel_checks|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa from pander...
null
null
null
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
67
8
assert
test_schema_only
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
expected
modified
eb98bd2f995040f80edc68a77a9fad41842881d3ef268260a12b291cf725b293
assert|test_schema_only|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameMo...
expected
67
8
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
145
8
assert
test_data_only
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
expected
modified
1283ace515d5f278e97699fd30ed3547e7db1557200a074dbe2d20bc2a419e74
assert|test_data_only|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameMode...
expected
145
8
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
230
8
assert
test_schema_and_data
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
expected
modified
e0a6763f98474582453a6010df01dc6a828a3dd9dbea44e46c3f632ad65e734c
assert|test_schema_and_data|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFra...
expected
230
8
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
325
8
assert
test_schema_and_data
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
expected_dataframemodel["SCHEMA"]
modified
e84eafb607f18888bbec96f21376c7684b4615cc2640aa057f483b9dedcb67c0
assert|test_schema_and_data|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFra...
expected_dataframemodel["SCHEMA"]
325
8
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
70
4
assert
test_schema_with_bare_types_and_field
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa f...
Model.to_schema()
added
707718144f4bd730c491484543f9beb69e8e6cf2c581eaa63cf5b87e05d33d0b
assert|test_schema_with_bare_types_and_field|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.exten...
null
null
null
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
95
4
assert
test_schema_with_bare_types_field_and_checks
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa f...
Model.to_schema()
added
fbe3600f469c3905e69bbad86e32592a8f7994983029a8c0f45febd6d4afc108
assert|test_schema_with_bare_types_field_and_checks|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.ap...
null
null
null
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
185
4
assert
test_pyspark_bare_fields
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa f...
None
added
b0bf59e5852330a8e77734e64af40ad902d2c88df6ea035b418fd27e0c2ed821
assert|test_pyspark_bare_fields|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax ...
null
null
null
unionai-oss/pandera
train
246
de0ec5f10132c1fdefffc4e4673aadff539531ee
train
tests/pyspark/test_pyspark_model.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_model.py
324
9
pytest.raises
test_dataframe_schema_unique_wrong_column
"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pandera.api.extensions as pax import pandera.pyspark as pa f...
SchemaDefinitionError)
added
44d15281caa748b58e9af4a36f625629577cc5bb277c544591005cd13a4e0cd6
pytest.raises|test_dataframe_schema_unique_wrong_column|"""Unit tests for DataFrameModel module.""" # pylint:disable=abstract-method from contextlib import nullcontext as does_not_raise from typing import Optional from pyspark.sql import DataFrame import pyspark.sql.types as T import pytest import pandera import pander...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_engine.py
test
unionai-oss/pandera:tests/geopandas/test_engine.py
21
4
assert
test_engine_geometry_simple
"""Unit tests for the geopandas engine dtype Geometry.""" import shapely import numpy as np import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import pandera as pa from pandera.engines.pandas_engine import Geometry, DateTime def test_engine_geometry_simple(): """Test Ge...
"EPSG:4326"
added
39211122ea69e28227aa45f69460817309dd68a9e85b7daa3ca0be72f67bec76
assert|test_engine_geometry_simple|"""Unit tests for the geopandas engine dtype Geometry.""" import shapely import numpy as np import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import pandera as pa from pandera.engines.pandas_engine import Geometry, DateTime def test_engine_ge...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_engine.py
test
unionai-oss/pandera:tests/geopandas/test_engine.py
163
4
assert
test_engine_geometry_coerce_crs
"""Unit tests for the geopandas engine dtype Geometry.""" import shapely import numpy as np import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import pandera as pa from pandera.engines.pandas_engine import Geometry, DateTime def test_engine_geometry_simple(): """Test Ge...
np.all(coerced.crs == dtype.crs)
added
c98f70150e8b19f8b41ba01f38ef0ba8bc7f5273dc25298aa26c0daf738b584a
assert|test_engine_geometry_coerce_crs|"""Unit tests for the geopandas engine dtype Geometry.""" import shapely import numpy as np import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import pandera as pa from pandera.engines.pandas_engine import Geometry, DateTime def test_engin...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_from_to_format_conversions.py
train
unionai-oss/pandera:tests/geopandas/test_from_to_format_conversions.py
237
12
assert
test_from_format
# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of GeoDataFrame from and to different formats.""" import io import json import tempfile from typing import Any import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import pandera as pa from pa...
gdf.equals(out)
added
ecfe3002bd432b1cb939144657ed06e9526c2cf80042a27b9763c11828f849e9
assert|test_from_format|# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of GeoDataFrame from and to different formats.""" import io import json import tempfile from typing import Any import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import p...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_from_to_format_conversions.py
train
unionai-oss/pandera:tests/geopandas/test_from_to_format_conversions.py
300
13
pytest.raises
test_to_format
# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of GeoDataFrame from and to different formats.""" import io import json import tempfile from typing import Any import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point import pandera as pa from pa...
ImportError)
added
b767246c2864eba9f32a712c14e7cece03a330607d8dd218b6fc14bef7257b0e
pytest.raises|test_to_format|# pylint: disable=missing-class-docstring,too-few-public-methods """Test conversion of GeoDataFrame from and to different formats.""" import io import json import tempfile from typing import Any import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point imp...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_geopandas.py
train
unionai-oss/pandera:tests/geopandas/test_geopandas.py
112
4
assert
test_schema_dtype_crs_without_coerce
"""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](**gdf_args), gpd.GeoDataFrame)
added
4c76f81ad2362253489fa1e6df7d646342b00149055fa09c3705bd517a04bd62
assert|test_schema_dtype_crs_without_coerce|"""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 Pol...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_geopandas.py
train
unionai-oss/pandera:tests/geopandas/test_geopandas.py
241
4
assert
test_schema_multiple_geometry_different_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 ...
"EPSG:4326"
added
a17df40cbc9ae4623e02554d8b48a78bf6955b7e6de578cefa16ab54336b362c
assert|test_schema_multiple_geometry_different_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 imp...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_pydantic.py
train
unionai-oss/pandera:tests/geopandas/test_pydantic.py
34
4
assert
test_pydantic_active_geometry
"""Tests GeoPandas schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point from pydantic import BaseModel, ValidationError import pan...
isinstance(obj.data, gpd.GeoDataFrame)
added
782018c9c274cb8da04875bad489b6bf8c364346b04715af938fcb2faf17c1a4
assert|test_pydantic_active_geometry|"""Tests GeoPandas schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point from pydantic import Ba...
null
null
null
unionai-oss/pandera
train
247
a54d4db01ed44fea5a070290be069fad8353b150
train
tests/geopandas/test_pydantic.py
train
unionai-oss/pandera:tests/geopandas/test_pydantic.py
69
4
assert
test_pydantic_inactive_geometry
"""Tests GeoPandas schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point from pydantic import BaseModel, ValidationError import pan...
isinstance(obj.data, gpd.GeoDataFrame)
added
1cee7314c9f4ac7ab20492bd10e8e26c4f9a093d05d766e9ae96f9238aa21770
assert|test_pydantic_inactive_geometry|"""Tests GeoPandas schema creation and validation from type annotations.""" # pylint:disable=missing-class-docstring,missing-function-docstring,too-few-public-methods import pandas as pd import geopandas as gpd import pytest from shapely.geometry import Point from pydantic import ...
null
null
null
unionai-oss/pandera
train
248
be1e1ae9318076596a5f49076fdad7ac49f890f1
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
85
8
assert
test_mypy_pandas_dataframe
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
expected["errcode"]
added
0c1f10ff4cbfdf7813811001ea9304938c820b95cb0607dde1b62d4886068a8b
assert|test_mypy_pandas_dataframe|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess imp...
null
null
null
unionai-oss/pandera
train
248
be1e1ae9318076596a5f49076fdad7ac49f890f1
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
106
8
assert
test_pandera_runtime_errors
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
"age"
added
e0658100419a4d1de42d18588b42015984ced853e0922ab4a2bac93c0016abbc
assert|test_pandera_runtime_errors|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess im...
null
null
null
unionai-oss/pandera
train
248
be1e1ae9318076596a5f49076fdad7ac49f890f1
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
204
4
assert
test_pandas_stubs_false_positives
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
len(resulting_errors)
added
2354da74dd2f4bc87bcb4b51ef270e0e93b8df02f5ce4cf71d9e3df117487c68
assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc...
null
null
null
unionai-oss/pandera
train
248
be1e1ae9318076596a5f49076fdad7ac49f890f1
train
tests/mypy/test_static_type_checking.py
val
unionai-oss/pandera:tests/mypy/test_static_type_checking.py
206
8
assert
test_pandas_stubs_false_positives
# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subprocess import sys import typing from pathl...
expected["errcode"]
added
bd404fbcd6581b38172143c4560a71bbb5e6da8b0e9b0720891c7765185c4f10
assert|test_pandas_stubs_false_positives|# pylint: skip-file """Unit tests for static type checking of dataframes. This module uses subprocess and the pytest.capdf fixture to capture the output of calling mypy on the python modules in the tests/core/static folder. """ import importlib import os import re import subproc...
null
null
null
unionai-oss/pandera
train
249
37c24d94ae719dcf4cdc36d1f204478539fce74a
train
tests/pyspark/test_pyspark_container.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_container.py
179
4
assert
test_pyspark_regex_column
"""Unit tests for pyspark container.""" from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark import DataFrameSchema, Column spark = SparkSession.buil...
None
added
d7a82b2259fd0e0dff9cad122af7ce1e70adc3e9cf4d387ba83c04dda1d49206
assert|test_pyspark_regex_column|"""Unit tests for pyspark container.""" from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark import DataFrameSchema, C...
null
null
null
unionai-oss/pandera
train
249
37c24d94ae719dcf4cdc36d1f204478539fce74a
train
tests/pyspark/test_pyspark_container.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_container.py
187
4
assert
test_pyspark_regex_column
"""Unit tests for pyspark container.""" from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark import DataFrameSchema, Column spark = SparkSession.buil...
not df_out.pandera.errors
added
0658ee0e49676db8377601e40c3d7d391fd3746163179551e3ae9ecd22d03fee
assert|test_pyspark_regex_column|"""Unit tests for pyspark container.""" from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark import DataFrameSchema, C...
null
null
null
unionai-oss/pandera
train
250
58a33091864640af15489789d53e12b9761f1e1d
train
tests/pyspark/test_pyspark_container.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_container.py
40
4
assert
test_pyspark_dataframeschema
"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark impo...
not df_out.pandera.errors
modified
81abc4bbc3680b31cf4ef4ba25add55d3964d7fe24868c1530ee700aac2333c5
assert|test_pyspark_dataframeschema|"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, Valida...
not df_out.pandera.errors
39
4
unionai-oss/pandera
train
250
58a33091864640af15489789d53e12b9761f1e1d
train
tests/pyspark/test_pyspark_container.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_container.py
123
4
assert
test_pyspark_column_metadata
"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark impo...
expected
modified
4431a21c89974be189d357e25f11935517e1b498c0c717066b519237ec5e7f82
assert|test_pyspark_column_metadata|"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, Valida...
expected
122
4
unionai-oss/pandera
train
250
58a33091864640af15489789d53e12b9761f1e1d
train
tests/pyspark/test_pyspark_container.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_container.py
160
4
assert
test_pyspark_sample
"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark impo...
isinstance(df_out, DataFrame)
modified
36b587159ec84392d08768653af586e21de36dc326a6831b9524c5dc4b13f34b
assert|test_pyspark_sample|"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth...
isinstance(df_out, DataFrame)
159
4
unionai-oss/pandera
train
250
58a33091864640af15489789d53e12b9761f1e1d
train
tests/pyspark/test_pyspark_container.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_container.py
220
4
assert
test_pyspark_nullable
"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDepth from pandera.pyspark impo...
isinstance(df_out, DataFrame)
added
e7604aaafb30efaed2ae68fcbca1cf065e338d9c959e83b502c7e6e8cd9c38f9
assert|test_pyspark_nullable|"""Unit tests for pyspark container.""" from contextlib import nullcontext as does_not_raise from pyspark.sql import DataFrame, SparkSession import pyspark.sql.types as T import pytest import pandera.pyspark as pa import pandera.errors from pandera.config import PanderaConfig, ValidationDep...
null
null
null
unionai-oss/pandera
train
251
adf0494fd1aa790410fb6371489f9c800a66e7e0
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
48
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 import pyspark.sql.types as T from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
TestSchema.validate(input_df)
modified
af535897c3208a34e8d0ad9782d334c195cf8f261e191f861bad92199bca12ed
assert|test_disable_validation|"""This module is to test the behaviour change based on defined config in pandera""" # pylint:disable=import-outside-toplevel,abstract-method import pyspark.sql.types as T from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, Data...
None
47
8
unionai-oss/pandera
train
251
adf0494fd1aa790410fb6371489f9c800a66e7e0
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
67
8
assert
test_schema_only
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
expected
modified
1aed7e492e47a32df109d6d791e18fd8f0947e0de95229a702b5701af6c32d35
assert|test_schema_only|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameMo...
expected
67
8
unionai-oss/pandera
train
251
adf0494fd1aa790410fb6371489f9c800a66e7e0
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
204
8
assert
test_data_only
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
dict(output_dataframemodel_df.pandera.errors).keys()
modified
46fbabe44b4963e8935d4817126a97f14ddfb2eef323b76d3d21a35905cbd7cb
assert|test_data_only|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameMode...
dict(output_dataframemodel_df.pandera.errors).keys()
204
8
unionai-oss/pandera
train
251
adf0494fd1aa790410fb6371489f9c800a66e7e0
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
273
8
assert
test_schema_and_data
"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFrameModel, ...
expected_dataframeschema["SCHEMA"]
modified
2809f64323a9b844323fbdef56a68ac46c103defc124c1d5963f51c5981c4442
assert|test_schema_and_data|"""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 from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, DataFra...
expected_dataframeschema["SCHEMA"]
273
8
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
96
8
assert
test_schema_only
"""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, Dat...
expected_dataframeschema["SCHEMA"]
added
86735cec8899ab74ba21e20cc4d6459002a24abf22e8373fbec247d07131ec59
assert|test_schema_only|"""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, Colum...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
215
8
assert
test_data_only
"""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, Dat...
expected_dataframemodel["DATA"]
added
c1a130bf207828fbd5f76e2cc2e250933af3ba7077b20118d6d1a9d395a41dd6
assert|test_data_only|"""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,...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
330
8
assert
test_schema_and_data
"""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, Dat...
expected_dataframemodel["DATA"]
added
e9ed39fced056766957b03e92a5488ad4e7b93ed82701d4e035b3205d97248d3
assert|test_schema_and_data|"""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, C...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
359
8
assert
test_pyspark_cache_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, Dat...
expected
added
b315126a0f1049947acc3af3e5c17426d202f10b3491c30d99e7ea84d6d4a817
assert|test_pyspark_cache_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, DataFrameSc...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_decorators.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py
60
13
pytest.raises
test_pyspark_cache_requirements
"""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....
ValueError)
added
1c6edb2e524d3da91dddfe38a04444b409bca7cb33f7ea89e5fe0e399e9e2f09
pytest.raises|test_pyspark_cache_requirements|"""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 ...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_decorators.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py
106
8
assert
test_pyspark_cache_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....
isinstance(df_out, DataFrame)
added
084429dc8aa0231fbc38878b257cfcb988c51173e80f084f5289b83e15143a24
assert|test_pyspark_cache_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 pyte...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_decorators.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py
115
12
assert
test_pyspark_cache_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
added
adc78b6a527e58c0b8e7c7320acd8b79351ab81ed7ef9afd0c355e567afad503
assert|test_pyspark_cache_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 pyte...
null
null
null
unionai-oss/pandera
train
252
bc5e37aac36b0794f3efe6ca00a711c7bb3b33b6
train
tests/pyspark/test_pyspark_decorators.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py
124
12
assert
test_pyspark_cache_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
added
32f6c2f2d3ee5748a6d7799ab6f5dda092227f20d7910b71e251f96d3638c5c2
assert|test_pyspark_cache_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 pyte...
null
null
null
unionai-oss/pandera
train
253
d89ddaf2a26ea0848e135033f11062627471a688
train
tests/strategies/test_strategies.py
train
unionai-oss/pandera:tests/strategies/test_strategies.py
564
8
assert
test_dataframe_with_regex
# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock import MagicMock from warnings impor...
n_regex_columns
added
d8a1603f17e8015acd4de623ad9ae501f4a08a1fefe9824b4c401dc1bd80b680
assert|test_dataframe_with_regex|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock impo...
null
null
null
unionai-oss/pandera
train
253
d89ddaf2a26ea0848e135033f11062627471a688
train
tests/strategies/test_strategies.py
train
unionai-oss/pandera:tests/strategies/test_strategies.py
642
9
pytest.raises
test_multiindex_strategy
# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock import MagicMock from warnings impor...
pa.errors.BaseStrategyOnlyError)
added
ba08212ca5604ee9fc0a1536806a8920c864fe7e2bd4fecb0ce7ef2842029058
pytest.raises|test_multiindex_strategy|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.moc...
null
null
null
unionai-oss/pandera
train
253
d89ddaf2a26ea0848e135033f11062627471a688
train
tests/strategies/test_strategies.py
train
unionai-oss/pandera:tests/strategies/test_strategies.py
974
13
pytest.raises
test_schema_component_with_no_pdtype
# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock import MagicMock from warnings impor...
pa.errors.SchemaDefinitionError)
added
48d40997c69e2cb0fb45b52eff6713db7c77d5d0bda02795c1f558adc384a67b
pytest.raises|test_schema_component_with_no_pdtype|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from ...
null
null
null
unionai-oss/pandera
train
253
d89ddaf2a26ea0848e135033f11062627471a688
train
tests/strategies/test_strategies.py
train
unionai-oss/pandera:tests/strategies/test_strategies.py
1,095
4
assert
test_empty_nullable_schema
# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock import MagicMock from warnings impor...
data.draw(schema.strategy(size=0)).empty
added
a0ec250575da2b84cae7105673faf5ad69fe5d35fc86a0d57f1dc0584e0fe93c
assert|test_empty_nullable_schema|# pylint: disable=undefined-variable,redefined-outer-name,invalid-name,undefined-loop-variable,too-many-lines # noqa """Unit tests for pandera data generating strategies.""" import datetime import operator import re from typing import Any, Callable, Optional, Set from unittest.mock imp...
null
null
null
unionai-oss/pandera
train
254
a318e48a34426d310aad031c5c4e04aa18f55642
train
tests/core/test_pandas_engine.py
test
unionai-oss/pandera:tests/core/test_pandas_engine.py
40
4
assert
test_pandas_data_type
"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine from pandera.errors import ParserErr...
not pd_dtype.check("foo")
modified
05284456128ab3d3d6466d09aa57d33b6c8ad74dcc3256139ce019c3ff143ee4
assert|test_pandas_data_type|"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine from pande...
not pd_dtype.check("foo")
39
4
unionai-oss/pandera
train
254
a318e48a34426d310aad031c5c4e04aa18f55642
train
tests/core/test_pandas_engine.py
test
unionai-oss/pandera:tests/core/test_pandas_engine.py
100
4
assert
test_pandas_category_dtype
"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine from pandera.errors import ParserErr...
dtype.check(coerced_data.dtype)
added
cff3532ef5b3ae7750795b25686f40309e1743b42e0d60b01dbf53c1b5e0b252
assert|test_pandas_category_dtype|"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine from ...
null
null
null
unionai-oss/pandera
train
254
a318e48a34426d310aad031c5c4e04aa18f55642
train
tests/core/test_pandas_engine.py
test
unionai-oss/pandera:tests/core/test_pandas_engine.py
133
8
assert
test_pandas_boolean_native_type
"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine from pandera.errors import ParserErr...
dtype.check(coerced_data.dtype)
added
8671734e6a6b7c015f4fd74b00fa5165012d8a3bcd33f770b84b95bbdc54a4ba
assert|test_pandas_boolean_native_type|"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine ...
null
null
null
unionai-oss/pandera
train
254
a318e48a34426d310aad031c5c4e04aa18f55642
train
tests/core/test_pandas_engine.py
test
unionai-oss/pandera:tests/core/test_pandas_engine.py
187
13
pytest.raises
test_pandas_datetimetz_dtype
"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_engine from pandera.errors import ParserErr...
pytz.exceptions.NonExistentTimeError)
added
f68c61810c146170eb1f5aeb0483d58a196c613af80b2acd24aa9fcffeaad3fb
pytest.raises|test_pandas_datetimetz_dtype|"""Test pandas engine.""" from datetime import date import hypothesis import hypothesis.extra.pandas as pd_st import hypothesis.strategies as st import numpy as np import pandas as pd import pytest import pytz from hypothesis import given from pandera.engines import pandas_eng...
null
null
null
unionai-oss/pandera
train
255
fbdc6a0811b708f28d4dad410a0eca4814922144
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...
self.sample_data
added
e1d34e68759fe11bf11b63e39313250372c99655b05e7cf8cffc0dbc9034e986
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
255
fbdc6a0811b708f28d4dad410a0eca4814922144
train
tests/core/test_pandas_config.py
train
unionai-oss/pandera:tests/core/test_pandas_config.py
53
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...
self.sample_data
added
218eb67c854c94c186c13e4dcd00ee1fe96e43247f4f444c6f6a96a95f1487ac
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
255
fbdc6a0811b708f28d4dad410a0eca4814922144
train
tests/core/test_pandas_config.py
train
unionai-oss/pandera:tests/core/test_pandas_config.py
70
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
5e088633befe25228206ab378d3a9907e089d394122d53a3f7142184acd0f9f6
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
255
fbdc6a0811b708f28d4dad410a0eca4814922144
train
tests/core/test_pandas_config.py
train
unionai-oss/pandera:tests/core/test_pandas_config.py
71
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...
self.sample_data
added
b378f2de07cae3b4da68d9453d5f43a7969a841df331d792478af93e30740fc5
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
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/core/test_pandas_config.py
train
unionai-oss/pandera:tests/core/test_pandas_config.py
53
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
modified
35f04ffdafc34666b66b9af437db152b50fb70081f91ea82f870103073b41ab5
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 ...
expected
51
8
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/core/test_pandas_config.py
train
unionai-oss/pandera:tests/core/test_pandas_config.py
54
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...
self.sample_data
modified
eec088304c38ef9429d9ff631db7f2cd6b80abc88b9e8401ba23f19c850f635b
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 ...
self.sample_data
52
8
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/core/test_pandas_config.py
train
unionai-oss/pandera:tests/core/test_pandas_config.py
55
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...
self.sample_data
modified
f5bfebb3570af4cb08cc593e937bf786907c10ab3b91b7021fd1e9cbc7307e97
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 ...
self.sample_data
53
8
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
50
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 import pyspark.sql.types as T import pytest from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema, Column, Dat...
pandera_schema.validate(input_df)
modified
a68ffc8929cc9fb2ed060bd041b8292ff8a942c4123a3145b352cde7aeffd59e
assert|test_disable_validation|"""This module is to test the behaviour change based on defined config in pandera""" # pylint:disable=import-outside-toplevel,abstract-method import pyspark.sql.types as T import pytest from pandera.config import CONFIG, ValidationDepth from pandera.pyspark import ( Check, DataFrameSchema...
pandera_schema.validate(input_df)
50
8
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
278
8
assert
test_schema_and_data
"""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, Dat...
expected_dataframeschema["DATA"]
modified
7b9c987e617b2ac1174d43f2fe4fccd4170f9a92ff1d6441a3ce20ecfb0aedcf
assert|test_schema_and_data|"""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, C...
expected_dataframeschema["DATA"]
278
8
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/pyspark/test_pyspark_config.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_config.py
359
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, Dat...
expected
added
4e6716970562ce09a773f6e3fa5666d8cdae751e5bbc8f53abc67659b96c714b
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...
null
null
null
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/pyspark/test_pyspark_decorators.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py
106
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 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....
isinstance(df_out, DataFrame)
added
9b608f123c6039be4aa96c32887e472b243053c2e2c7c1f24c5169a62f9f3c2f
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...
null
null
null
unionai-oss/pandera
train
256
7a20c7a006c10c72d0ad8112067156595ce28d47
train
tests/pyspark/test_pyspark_decorators.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_decorators.py
111
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
added
631ec1e48f43f8b4ad431cfd4eeabc16288efc6fc752f6387f307c1b110e64e1
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...
null
null
null
unionai-oss/pandera
train
257
812b2a8af8c123c46caa348837da04e8c6573260
train
tests/pyspark/test_pyspark_accessor.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_accessor.py
40
4
assert
test_dataframe_add_schema
"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import pandera.pyspark as pa from pande...
schema1
modified
6aa16cb611d229168c013ca87983d58283c9873231c2994c1d6c4702985fae4b
assert|test_dataframe_add_schema|"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import p...
schema1
40
4
unionai-oss/pandera
train
257
812b2a8af8c123c46caa348837da04e8c6573260
train
tests/pyspark/test_pyspark_accessor.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_accessor.py
41
4
assert
test_dataframe_add_schema
"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import pandera.pyspark as pa from pande...
isinstance(schema1.validate(data), DataFrame)
modified
057afa8821966838241e9c2eaa0d21b97fb41ce8e2922c30fa48549e56fc8edd
assert|test_dataframe_add_schema|"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import p...
isinstance(schema1.validate(data), DataFrame)
41
4
unionai-oss/pandera
train
257
812b2a8af8c123c46caa348837da04e8c6573260
train
tests/pyspark/test_pyspark_accessor.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_accessor.py
42
4
assert
test_dataframe_add_schema
"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import pandera.pyspark as pa from pande...
isinstance(schema1(data), DataFrame)
modified
5fbe80ed3c70741f63b59c6e9c31f6568495a57f558de3a3b3fecaae0bbb6439
assert|test_dataframe_add_schema|"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import p...
isinstance(schema1(data), DataFrame)
42
4
unionai-oss/pandera
train
257
812b2a8af8c123c46caa348837da04e8c6573260
train
tests/pyspark/test_pyspark_accessor.py
train
unionai-oss/pandera:tests/pyspark/test_pyspark_accessor.py
44
8
assert
test_dataframe_add_schema
"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import pandera.pyspark as pa from pande...
{ "WRONG_DATATYPE": [ { "schema": None, "column": "col", "check": f"dtype('{str(FloatType())}')", "error": f"expected column 'col' to have type {str(FloatType())}, got {str(LongType())}", } ] }
modified
bc0db434e20469ee28182dfe24ebedce2c976f51ce15cb422ee3c5b349022685
assert|test_dataframe_add_schema|"""Unit tests for pyspark_accessor module.""" from typing import Union from pyspark.sql import DataFrame, SparkSession from pyspark.sql.functions import col from pyspark.sql.types import FloatType, LongType import pytest from pandera.config import PanderaConfig, ValidationDepth import p...
{ "WRONG_DATATYPE": [ { "schema": None, "column": "col", "check": f"dtype('{str(FloatType())}')", "error": f"expected column 'col' to have type {str(FloatType())}, got {str(LongType())}", } ] }
44
8
unionai-oss/pandera
train
258
4df61da2109b40d87427335928b4d12788ef29bd
train
tests/core/test_decorators.py
train
unionai-oss/pandera:tests/core/test_decorators.py
989
9
pytest.raises
test_check_types_star_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.SchemaError, match="column 'a' not in dataframe")
added
94d72126a41ef6d361d816c44fe6a4e2e997dfe4a75f284d29af525390ed995c
pytest.raises|test_check_types_star_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...
null
null
null