Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit cef5849

Browse files
committed
Add test for overriding overrides
1 parent 511fd81 commit cef5849

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/structured_data/test_adt.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,3 +343,16 @@ class Subclass(Product):
343343

344344
assert Product("test") == Product("test", [])
345345
assert tuple.__getitem__(Subclass("test"), slice(None)) == ("test",)
346+
347+
348+
def test_unsetting(adt):
349+
class Prod(adt.Product):
350+
fst: int
351+
snd: str
352+
353+
__lt__ = False
354+
355+
class Subclass(Prod, order=True):
356+
__lt__ = adt.Product.__lt__
357+
358+
assert Subclass(3, "abc") > Subclass(2, "def")

0 commit comments

Comments
 (0)