import pytest  # type: ignore

from ppb_vector import Vector


@pytest.fixture()
def vector():
    return Vector(10, 20)


def test_class_member_access(vector):
    assert vector.x == 10
    assert vector.y == 20


def test_index_access(vector):
    assert vector[0] == 10
    assert vector[1] == 20


def test_key_access(vector):
    assert vector["x"] == 10
    assert vector["y"] == 20

@@ -1,12 +1,41 @@
+from hypothesis import given%0A
 import pytes
@@ -83,16 +83,42 @@
  Vector%0A
+from utils import vectors%0A
 %0A%0A@pytes
@@ -255,32 +255,52 @@
 ector.y == 20%0A%0A%0A
+@given(v=vectors())%0A
 def test_index_a
@@ -298,32 +298,35 @@
 t_index_access(v
+: V
 ector):%0A    asse
@@ -333,22 +333,18 @@
 rt v
-ector
 %5B0%5D == 
-10
+v.x
 %0A   
@@ -356,24 +356,40 @@
 rt v
-ector
 %5B1%5D == 
-20%0A%0A
+v.y%0A%0A%0A@given(v=vectors())
 %0Adef
@@ -398,32 +398,35 @@
 est_key_access(v
+: V
 ector):%0A    asse
@@ -429,21 +429,16 @@
 assert v
-ector
 %5B%22x%22%5D ==
@@ -434,26 +434,27 @@
 t v%5B%22x%22%5D == 
-10
+v.x
 %0A    assert 
@@ -454,21 +454,16 @@
 assert v
-ector
 %5B%22y%22%5D ==
@@ -459,15 +459,16 @@
 t v%5B%22y%22%5D == 
-20
+v.y
 %0A

Make {index.key}_access into Hypothesis tests