示例#1
0
def test_truncate(input_value, output):
    with pytest.warns(
            DeprecationWarning,
            match='`truncate` is no-longer used by pydantic and is deprecated'
    ):
        assert truncate(input_value, max_len=20) == output
示例#2
0
def test_truncate_type():
    assert truncate(object) == "<class 'object'>"