Skip to content

Commit

Permalink
Remove unnecessary parameterization of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope committed Jan 14, 2023
1 parent 46053d7 commit 83b91df
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_slots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 83b91df

Please sign in to comment.