From 83b91dff29ca4274bfe0ce5431b42f637f62728b Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Sat, 14 Jan 2023 16:47:16 +0000 Subject: [PATCH] Remove unnecessary parameterization of tests --- tests/test_slots.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_slots.py b/tests/test_slots.py index f436b3b8a..7902128e0 100644 --- a/tests/test_slots.py +++ b/tests/test_slots.py @@ -754,13 +754,12 @@ class A: c = attr.ib() -@pytest.mark.parametrize("cls", [A]) -def test_slots_unpickle_after_attr_removed(cls): +def test_slots_unpickle_after_attr_removed(): """ We don't assign attributes we don't have anymore if the class has removed it. """ - a = cls(1, 2, 3) + a = A(1, 2, 3) a_pickled = pickle.dumps(a) a_unpickled = pickle.loads(a_pickled) assert a_unpickled == a @@ -778,12 +777,11 @@ class NEW_A: assert not hasattr(new_a, "b") -@pytest.mark.parametrize("cls", [A]) -def test_slots_unpickle_after_attr_added(cls, frozen): +def test_slots_unpickle_after_attr_added(frozen): """ We don't assign attribute we haven't had before if the class has one added. """ - a = cls(1, 2, 3) + a = A(1, 2, 3) a_pickled = pickle.dumps(a) a_unpickled = pickle.loads(a_pickled)