Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d6a36d

Browse filesBrowse files
committed
change recursion tests and disabled it at the root
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
1 parent ff4af13 commit 5d6a36d
Copy full SHA for 5d6a36d

File tree

3 files changed

+3
-14
lines changed
Filter options

3 files changed

+3
-14
lines changed

‎Lib/test/support/__init__.py

Copy file name to clipboardExpand all lines: Lib/test/support/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,8 @@ def infinite_recursion(max_depth=None):
22882288
# Pick a number large enough to cause problems
22892289
# but not take too long for code that can handle
22902290
# very deep recursion.
2291-
max_depth = 20_000
2291+
# TODO: RUSTPYTHON: Fix this function
2292+
max_depth = 50
22922293
elif max_depth < 3:
22932294
raise ValueError("max_depth must be at least 3, got {max_depth}")
22942295
depth = get_recursion_depth()

‎Lib/test/test_faulthandler.py

Copy file name to clipboardExpand all lines: Lib/test/test_faulthandler.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def test_dump_ext_modules(self):
411411
self.assertIn(name, modules)
412412

413413
# TODO: RUSTPYTHON, AttributeError: module 'faulthandler' has no attribute 'is_enabled'
414-
@unittest.expectedFailure
414+
@unittest.skip("TODO: RUSTPYTHOn")
415415
def test_is_enabled(self):
416416
orig_stderr = sys.stderr
417417
try:

‎Lib/test/test_isinstance.py

Copy file name to clipboardExpand all lines: Lib/test/test_isinstance.py
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,12 @@ def test_subclass_tuple(self):
264264
self.assertEqual(True, issubclass(int, (int, (float, int))))
265265
self.assertEqual(True, issubclass(str, (str, (Child, str))))
266266

267-
# TODO: RUSTPYTHON
268-
@unittest.skip("RustPython stackoverflow")
269267
def test_subclass_recursion_limit(self):
270268
# make sure that issubclass raises RecursionError before the C stack is
271269
# blown
272270
with support.infinite_recursion():
273271
self.assertRaises(RecursionError, blowstack, issubclass, str, str)
274272

275-
# TODO: RUSTPYTHON
276-
@unittest.skip("RustPython stackoverflow")
277273
def test_isinstance_recursion_limit(self):
278274
# make sure that issubclass raises RecursionError before the C stack is
279275
# blown
@@ -310,8 +306,6 @@ def __bases__(self):
310306

311307
self.assertEqual(True, issubclass(B(), int))
312308

313-
# TODO: RUSTPYTHON
314-
@unittest.skip("RustPython stackoverflow")
315309
def test_infinite_recursion_in_bases(self):
316310
class X:
317311
@property
@@ -322,8 +316,6 @@ def __bases__(self):
322316
self.assertRaises(RecursionError, issubclass, int, X())
323317
self.assertRaises(RecursionError, isinstance, 1, X())
324318

325-
# TODO: RUSTPYTHON
326-
@unittest.skip("RustPython stackoverflow")
327319
def test_infinite_recursion_via_bases_tuple(self):
328320
"""Regression test for bpo-30570."""
329321
class Failure(object):
@@ -333,8 +325,6 @@ def __getattr__(self, attr):
333325
with self.assertRaises(RecursionError):
334326
issubclass(Failure(), int)
335327

336-
# TODO: RUSTPYTHON
337-
@unittest.skip("RustPython stackoverflow")
338328
def test_infinite_cycle_in_bases(self):
339329
"""Regression test for bpo-30570."""
340330
class X:
@@ -344,8 +334,6 @@ def __bases__(self):
344334
with support.infinite_recursion():
345335
self.assertRaises(RecursionError, issubclass, X(), int)
346336

347-
# TODO: RUSTPYTHON
348-
@unittest.skip("RustPython stackoverflow")
349337
def test_infinitely_many_bases(self):
350338
"""Regression test for bpo-30570."""
351339
class X:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.