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
This commit is contained in:
Damien George 2020-02-04 18:25:34 +11:00
parent ff9a61b5a8
commit 69b415f745
2 changed files with 10 additions and 11 deletions

View File

@ -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)

View File

@ -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')