tests: Move CPy diff test to real test now that subclass equality works.

Testing for equality of subclassed strings now works, thanks to commit
3aab54bf43
pull/5606/head
Damien George 2020-02-04 18:25:34 +11:00
rodzic ff9a61b5a8
commit 69b415f745
2 zmienionych plików z 10 dodań i 11 usunięć

Wyświetl plik

@ -0,0 +1,10 @@
# Test subclassing built-in str
class S(str):
pass
s = S('hello')
print(s == 'hello')
print('hello' == s)
print(s == 'Hello')
print('Hello' == s)

Wyświetl plik

@ -1,11 +0,0 @@
"""
categories: Types,str
description: Instance of a subclass of str cannot be compared for equality with an instance of a str
cause: Unknown
workaround: Unknown
"""
class S(str):
pass
s = S('hello')
print(s == 'hello')