File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,10 +166,16 @@ def test_nesting(self):
166166 eq (r ([[[[[[{}]]]]]]), "[[[[[[{}]]]]]]" )
167167 eq (r ([[[[[[[{}]]]]]]]), "[[[[[[[...]]]]]]]" )
168168
169- @unittest .skip ('hard to catch a cell object' )
170169 def test_cell (self ):
171- # XXX Hmm? How to get at a cell object?
172- pass
170+ def get_cell ():
171+ x = 42
172+ def inner ():
173+ return x
174+ return inner
175+ x = get_cell ().__closure__ [0 ]
176+ self .assertRegex (repr (x ),
177+ r'<cell at 0x[0-9a-f]+: int object at 0x[0-9a-f]+>' )
178+ self .assertRegex (r (x ), r'<cell at 0x.*\.\.\..*>' )
173179
174180 def test_descriptors (self ):
175181 eq = self .assertEqual
Original file line number Diff line number Diff line change 114114Tests
115115-----
116116
117+ - Issue #19928: Implemented a test for repr() of cell objects.
118+
117119- Issue #19535: Fixed test_docxmlrpc when python is run with -OO.
118120
119121- Issue #19926: Removed unneeded test_main from test_abstract_numbers.
You can’t perform that action at this time.
0 commit comments