<commit_before>import pytest  # type: ignore
from hypothesis import given

from ppb_vector import Vector
from utils import vector_likes, vectors


class V(Vector):
    pass


@pytest.mark.parametrize(
    "vector_like", vector_likes(), ids=lambda x: type(x).__name__,
)
@pytest.mark.parametrize("cls", [Vector, V])  # type: ignore
def test_convert_class(cls, vector_like):
    vector = cls(vector_like)
    assert isinstance(vector, cls)
    assert vector == vector_like


@given(vector=vectors())
def test_convert_tuple(vector: Vector):
    assert vector == tuple(vector) == (vector.x, vector.y)


@given(vector=vectors())
def test_convert_list(vector: Vector):
    assert vector == list(vector) == [vector.x, vector.y]


@given(vector=vectors())
def test_convert_dict(vector: Vector):
    assert vector == vector.asdict()<commit_msg>fixup! tests: Drop testsuite for subclassing<commit_after>import pytest  # type: ignore
from hypothesis import given

from ppb_vector import Vector
from utils import vector_likes, vectors


@pytest.mark.parametrize(
    "vector_like", vector_likes(), ids=lambda x: type(x).__name__,
)
def test_convert_class(vector_like):
    vector = Vector(vector_like)
    assert isinstance(vector, Vector)
    assert vector == vector_like


@given(vector=vectors())
def test_convert_tuple(vector: Vector):
    assert vector == tuple(vector) == (vector.x, vector.y)


@given(vector=vectors())
def test_convert_list(vector: Vector):
    assert vector == list(vector) == [vector.x, vector.y]


@given(vector=vectors())
def test_convert_dict(vector: Vector):
    assert vector == vector.asdict()
{'fraction_non_alphanumeric': 0.12461252324860508, 'fraction_numerical': 0.0, 'mean_word_length': 5.481927710843373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2092813', 'n_tokens_mistral': 527, 'n_tokens_neox': 513, 'n_words': 129}