tests/basics: Add test for equality between tuple and namedtuple.

This commit is contained in:
Damien George 2020-02-10 22:25:52 +11:00
parent 27465e6b24
commit 6a3ca96fe5
1 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,9 @@ for t in T(1, 2), T(bar=1, foo=2):
print(isinstance(t, tuple))
# Check tuple can compare equal to namedtuple with same elements
print(t == (t[0], t[1]), (t[0], t[1]) == t)
# Create using positional and keyword args
print(T(3, bar=4))