From 819380c964ca30f9d3e480a61371d502b7976abe Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 18 Feb 2020 22:44:05 +1100 Subject: [PATCH] tests/basics: Add test for tuple compare with class derived from tuple. Only the "==" operator was tested by the test suite in for such arguments. Other comparison operators like "<" take a different path in the code so need to be tested separately. --- tests/basics/subclass_native_cmp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/basics/subclass_native_cmp.py b/tests/basics/subclass_native_cmp.py index 1a095bfa1a..104b9f954a 100644 --- a/tests/basics/subclass_native_cmp.py +++ b/tests/basics/subclass_native_cmp.py @@ -7,3 +7,6 @@ t = mytuple((1, 2, 3)) print(t) print(t == (1, 2, 3)) print((1, 2, 3) == t) + +print(t < (1, 2, 3), t < (1, 2, 4)) +print((1, 2, 3) <= t, (1, 2, 4) < t)