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 0d8c482 commit 99f2a8aCopy full SHA for 99f2a8a
tests/test_future/test_str.py
@@ -363,6 +363,19 @@ def test_eq(self):
363
self.assertFalse(b'ABCD' == s)
364
self.assertFalse(bytes(b'ABCD') == s)
365
366
+ class OurCustomString(object):
367
+ def __init__(self, string):
368
+ self.string = string
369
+
370
+ def __str__(self):
371
+ return self.string
372
373
+ our_str = OurCustomString("foobar")
374
+ new_str = str("foobar")
375
376
+ self.assertFalse(our_str == new_str)
377
+ self.assertFalse(new_str == our_str)
378
379
def test_hash(self):
380
s = str('ABCD')
381
self.assertIsInstance(hash(s),int)
0 commit comments