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 @@ -2441,6 +2441,10 @@ def __str__(self):
24412441 self .assertTypedEqual (StrSubclass (StrWithStr (OtherStrSubclass ('abc' ))),
24422442 StrSubclass ('abc' ))
24432443
2444+ str_value = StrSubclass ('abc' )
2445+ self .assertIs (str (WithStr (str_value )), str_value )
2446+ self .assertIs (str (StrWithStr (str_value )), str_value )
2447+
24442448 self .assertTypedEqual (str (WithRepr ('<abc>' )), '<abc>' )
24452449 self .assertTypedEqual (str (WithRepr (StrSubclass ('<abc>' ))), StrSubclass ('<abc>' ))
24462450 self .assertTypedEqual (StrSubclass (WithRepr ('<abc>' )), StrSubclass ('<abc>' ))
@@ -2449,6 +2453,9 @@ def __str__(self):
24492453 self .assertTypedEqual (StrSubclass (WithRepr (OtherStrSubclass ('<abc>' ))),
24502454 StrSubclass ('<abc>' ))
24512455
2456+ repr_value = StrSubclass ('<abc>' )
2457+ self .assertIs (str (WithRepr (repr_value )), repr_value )
2458+
24522459 def test_unicode_repr (self ):
24532460 class s1 :
24542461 def __repr__ (self ):
You can’t perform that action at this time.
0 commit comments