Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/py-polars/tests/unit/testing/parametric/strategies/test_legacy.py
8446 views
1
import pytest
2
from hypothesis.errors import NonInteractiveExampleWarning
3
4
from polars.testing.parametric import columns, create_list_strategy
5
from polars.testing.parametric.strategies.core import _COL_LIMIT
6
7
8
@pytest.mark.hypothesis
9
def test_columns_deprecated() -> None:
10
with pytest.deprecated_call(), pytest.warns(NonInteractiveExampleWarning):
11
result = columns()
12
assert 0 <= len(result) <= _COL_LIMIT
13
14
15
@pytest.mark.hypothesis
16
def test_create_list_strategy_deprecated() -> None:
17
with pytest.deprecated_call(), pytest.warns(NonInteractiveExampleWarning):
18
result = create_list_strategy(size=5)
19
with pytest.warns(NonInteractiveExampleWarning):
20
assert len(result.example()) == 5
21
22