Revert "Backport METH_FASTCALL from Python 3.7 (#328)"

This reverts commit cf73bbd678.
This commit is contained in:
Justine Tunney 2022-05-12 06:49:54 -07:00
parent e7611a8476
commit 2ea1dc405c
102 changed files with 3299 additions and 2894 deletions

View file

@ -1,5 +1,4 @@
# Test the module type
import cosmo
import unittest
import weakref
from test.support import gc_collect, requires_type_collecting
@ -29,8 +28,7 @@ class ModuleTests(unittest.TestCase):
self.fail("__name__ = %s" % repr(s))
except AttributeError:
pass
if cosmo.MODE != 'tiny':
self.assertEqual(foo.__doc__, ModuleType.__doc__)
self.assertEqual(foo.__doc__, ModuleType.__doc__)
def test_uninitialized_missing_getattr(self):
# Issue 8297
@ -211,13 +209,12 @@ a = A(destroyed)"""
def test_module_repr_source(self):
r = repr(unittest)
starts_with = "<module 'unittest' from '"
ends_with = "__init__.pyc'>"
ends_with = "__init__.py'>"
self.assertEqual(r[:len(starts_with)], starts_with,
'{!r} does not start with {!r}'.format(r, starts_with))
self.assertEqual(r[-len(ends_with):], ends_with,
'{!r} does not end with {!r}'.format(r, ends_with))
@unittest.skipIf(True, "TODO: find out why final_a import fails")
@requires_type_collecting
def test_module_finalization_at_shutdown(self):
# Module globals and builtins should still be available during shutdown