File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/core/IronPython.StdLib/lib/test Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -157,8 +157,14 @@ def __init__(self):
157157 def _factory (self ):
158158 return []
159159 d = sub ()
160- self .assertTrue (repr (d ).startswith (
161- "defaultdict(<bound method sub._factory of defaultdict(..." ))
160+ # IronPython: repr class name change adopted from Python 3.7
161+ # original Python 3.4 test:
162+ # self.assertTrue(repr(d).startswith(
163+ # "defaultdict(<bound method sub._factory of defaultdict(..."))
164+ # Python 3.7 test:
165+ self .assertRegex (repr (d ),
166+ r"sub\(<bound method .*sub\._factory "
167+ r"of sub\(\.\.\., \{\}\)>, \{\}\)" )
162168
163169 # NOTE: printing a subclass of a builtin type does not call its
164170 # tp_print slot. So this part is essentially the same test as above.
Original file line number Diff line number Diff line change @@ -988,13 +988,12 @@ class MySet(set): pass
988988 self .assertEqual (repr (MyBytearray (b'x' )), "MyBytearray(b'x')" )
989989 self .assertEqual (repr (MyDeque (['c' ])), "MyDeque(['c'])" )
990990 self .assertTrue ("MyDefaultDict" in repr (MyDefaultDict (list )))
991- self .assertEqual (repr (MySet ()), "MySet()" )
992991 else :
993992 self .assertEqual (repr (MyArray ('b' )), "array('b')" )
994993 self .assertEqual (repr (MyBytearray (b'x' )), "bytearray(b'x')" )
995994 self .assertEqual (repr (MyDeque (['c' ])), "deque(['c'])" )
996995 self .assertTrue ("defaultdict" in repr (MyDefaultDict (list )))
997- self .assertEqual (repr (MySet ()), "MySet()" )
996+ self .assertEqual (repr (MySet ()), "MySet()" )
998997
999998
1000999run_test (__name__ )
You can’t perform that action at this time.
0 commit comments