mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add expected failures to failed/errored tests
This commit is contained in:
1 file changed
+20
@@ -15,6 +15,8 @@ from inspect import isabstract
|
||||
def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
class TestLegacyAPI(unittest.TestCase):
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractproperty_basics(self):
|
||||
@abc.abstractproperty
|
||||
def foo(self): pass
|
||||
@@ -32,6 +34,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
self.assertEqual(D().foo, 3)
|
||||
self.assertFalse(getattr(D.foo, "__isabstractmethod__", False))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractclassmethod_basics(self):
|
||||
@abc.abstractclassmethod
|
||||
def foo(cls): pass
|
||||
@@ -50,6 +54,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
self.assertEqual(D.foo(), 'D')
|
||||
self.assertEqual(D().foo(), 'D')
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractstaticmethod_basics(self):
|
||||
@abc.abstractstaticmethod
|
||||
def foo(): pass
|
||||
@@ -71,6 +77,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
|
||||
class TestABC(unittest.TestCase):
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_ABC_helper(self):
|
||||
# create an ABC using the helper class and perform basic checks
|
||||
class C(abc.ABC):
|
||||
@@ -91,6 +99,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
def bar(self): pass
|
||||
self.assertFalse(hasattr(bar, "__isabstractmethod__"))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractproperty_basics(self):
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
@@ -109,6 +119,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
def foo(self): return super().foo
|
||||
self.assertEqual(D().foo, 3)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractclassmethod_basics(self):
|
||||
@classmethod
|
||||
@abc.abstractmethod
|
||||
@@ -129,6 +141,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
self.assertEqual(D.foo(), 'D')
|
||||
self.assertEqual(D().foo(), 'D')
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractstaticmethod_basics(self):
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
@@ -149,6 +163,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
self.assertEqual(D.foo(), 4)
|
||||
self.assertEqual(D().foo(), 4)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_abstractmethod_integration(self):
|
||||
for abstractthing in [abc.abstractmethod, abc.abstractproperty,
|
||||
abc.abstractclassmethod,
|
||||
@@ -177,6 +193,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
self.assertRaises(TypeError, F) # because bar is abstract now
|
||||
self.assertTrue(isabstract(F))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_descriptors_with_abstractmethod(self):
|
||||
class C(metaclass=abc_ABCMeta):
|
||||
@property
|
||||
@@ -208,6 +226,8 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||
foo = property(bar)
|
||||
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_customdescriptors_with_abstractmethod(self):
|
||||
class Descriptor:
|
||||
def __init__(self, fget, fset=None):
|
||||
|
||||
Reference in new issue
Block a user