We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bee328 commit d541661Copy full SHA for d541661
graalpython/com.oracle.graal.python.test/src/tests/test_id.py
@@ -68,14 +68,18 @@ def test_id_is_constant_even_when_object_changes():
68
assert id(l) == lid
69
70
def test_identity():
71
- assert True is True
+ val = True
72
+ assert val is True
73
assert memoryview(b"").readonly is True # compare a PInt bool (from C) to a boolean
74
- assert 12 is 12
75
+ val = 12
76
+ assert val is 12
77
assert memoryview(b"123").nbytes == 3 # compare PInt (from C) to an int
78
class I(int): pass
- assert I(12) is not 12
- assert 12.0 is 12.0
79
+ val = I(12)
80
+ assert val is not 12
81
+ val = 12.0
82
+ assert val is 12.0
83
84
nan = float('nan')
85
assert nan is nan
0 commit comments