test_ok1/testing/example_scripts/dataclasses/test_compare_dataclasses_ve...

15 lines
311 B
Python
Raw Normal View History

from dataclasses import dataclass
from dataclasses import field
def test_dataclasses_verbose():
@dataclass
class SimpleDataObject(object):
field_a: int = field()
field_b: int = field()
left = SimpleDataObject(1, "b")
right = SimpleDataObject(1, "c")
assert left == right