(self)
| 2116 | |
| 2117 | class TestDefStruct: |
| 2118 | def test_defstruct_simple(self): |
| 2119 | Point = defstruct("Point", ["x", "y"]) |
| 2120 | assert issubclass(Point, Struct) |
| 2121 | assert as_tuple(Point(1, 2)) == (1, 2) |
| 2122 | assert Point.__module__ == "tests.unit.test_struct" |
| 2123 | |
| 2124 | def test_defstruct_empty(self): |
| 2125 | Empty = defstruct("Empty", []) |