mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Revert "Backport METH_FASTCALL from Python 3.7 (#328)"
This reverts commit cf73bbd678
.
This commit is contained in:
parent
e7611a8476
commit
2ea1dc405c
102 changed files with 3299 additions and 2894 deletions
|
@ -4,7 +4,6 @@
|
|||
import abc
|
||||
import sys
|
||||
import unittest
|
||||
import cosmo
|
||||
from types import DynamicClassAttribute
|
||||
|
||||
class PropertyBase(Exception):
|
||||
|
@ -118,13 +117,13 @@ class PropertyTests(unittest.TestCase):
|
|||
self.assertRaises(PropertySet, setattr, sub, "spam", None)
|
||||
self.assertRaises(PropertyDel, delattr, sub, "spam")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_decorator_subclass_doc(self):
|
||||
sub = SubClass()
|
||||
self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "SubClass.getter")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_decorator_baseclass_doc(self):
|
||||
base = BaseClass()
|
||||
|
@ -136,7 +135,7 @@ class PropertyTests(unittest.TestCase):
|
|||
self.assertEqual(base.__class__.__dict__['spam'].__doc__, "spam spam spam")
|
||||
self.assertEqual(sub.__class__.__dict__['spam'].__doc__, "spam spam spam")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_getter_doc_override(self):
|
||||
newgettersub = PropertySubNewGetter()
|
||||
|
@ -222,7 +221,7 @@ class PropertySubclassTests(unittest.TestCase):
|
|||
else:
|
||||
raise Exception("AttributeError not raised")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_docstring_copy(self):
|
||||
class Foo(object):
|
||||
|
@ -234,7 +233,7 @@ class PropertySubclassTests(unittest.TestCase):
|
|||
Foo.__dict__['spam'].__doc__,
|
||||
"spam wrapped in DynamicClassAttribute subclass")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_setter_copies_getter_docstring(self):
|
||||
class Foo(object):
|
||||
|
@ -268,7 +267,7 @@ class PropertySubclassTests(unittest.TestCase):
|
|||
FooSub.__dict__['spam'].__doc__,
|
||||
"spam wrapped in DynamicClassAttribute subclass")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2 or cosmo.MODE == 'tiny',
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_property_new_getter_new_docstring(self):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue