Skip to content

Commit

Permalink
Check our eq works too
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Mar 21, 2024
1 parent 0a2ccc8 commit a4d7381
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_converters.py
Expand Up @@ -23,7 +23,11 @@ def test_pickle(self, takes_self, takes_field):
"""
c = Converter(int, takes_self=takes_self, takes_field=takes_field)

assert c == pickle.loads(pickle.dumps(c))
new_c = pickle.loads(pickle.dumps(c))

assert c == new_c
assert takes_self == new_c.takes_self
assert takes_field == new_c.takes_field

@pytest.mark.parametrize(
"scenario",
Expand All @@ -49,6 +53,7 @@ def test_fmt_converter_call(self, scenario):
according to `takes_self` and `takes_field`.
"""
(takes_self, takes_field), expect = scenario

c = Converter(None, takes_self=takes_self, takes_field=takes_field)

assert expect == c._fmt_converter_call("le_name", "le_value")
Expand Down

0 comments on commit a4d7381

Please sign in to comment.