File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2440,6 +2440,10 @@ def __str__(self):
24402440 self .assertTypedEqual (StrSubclass (StrWithStr (OtherStrSubclass ('abc' ))),
24412441 StrSubclass ('abc' ))
24422442
2443+ str_value = StrSubclass ('abc' )
2444+ self .assertIs (str (WithStr (str_value )), str_value )
2445+ self .assertIs (str (StrWithStr (str_value )), str_value )
2446+
24432447 self .assertTypedEqual (str (WithRepr ('<abc>' )), '<abc>' )
24442448 self .assertTypedEqual (str (WithRepr (StrSubclass ('<abc>' ))), StrSubclass ('<abc>' ))
24452449 self .assertTypedEqual (StrSubclass (WithRepr ('<abc>' )), StrSubclass ('<abc>' ))
@@ -2448,6 +2452,9 @@ def __str__(self):
24482452 self .assertTypedEqual (StrSubclass (WithRepr (OtherStrSubclass ('<abc>' ))),
24492453 StrSubclass ('<abc>' ))
24502454
2455+ repr_value = StrSubclass ('<abc>' )
2456+ self .assertIs (str (WithRepr (repr_value )), repr_value )
2457+
24512458 def test_unicode_repr (self ):
24522459 class s1 :
24532460 def __repr__ (self ):
You can’t perform that action at this time.
0 commit comments