mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 11:14:38 +08:00
11 files changed
+123
-48
No files matched your search
Vendored
+20
-10
@@ -134,7 +134,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
self.assertEqual(f(int_data), f(bytes_data))
|
||||
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 7 out of range for slice of length 4'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b64encode(self):
|
||||
eq = self.assertEqual
|
||||
# Test default alphabet
|
||||
@@ -185,7 +186,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
b'\xd3V\xbeo\xf7\x1d', b'01a-b_cd')
|
||||
self.check_encode_type_errors(base64.urlsafe_b64encode)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 7 out of range for slice of length 4'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b64decode(self):
|
||||
eq = self.assertEqual
|
||||
|
||||
@@ -282,7 +284,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
self.assertEqual(base64.b64decode(b'++[[//]]', b'[]'), res)
|
||||
self.assertEqual(base64.urlsafe_b64decode(b'++--//__'), res)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 7 out of range for slice of length 4'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b32encode(self):
|
||||
eq = self.assertEqual
|
||||
eq(base64.b32encode(b''), b'')
|
||||
@@ -296,7 +299,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
self.check_other_types(base64.b32encode, b'abcd', b'MFRGGZA=')
|
||||
self.check_encode_type_errors(base64.b32encode)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 11 out of range for slice of length 8'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b32decode(self):
|
||||
eq = self.assertEqual
|
||||
tests = {b'': b'',
|
||||
@@ -371,7 +375,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
with self.assertRaises(binascii.Error):
|
||||
base64.b32decode(data.decode('ascii'))
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 11 out of range for slice of length 8'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b16encode(self):
|
||||
eq = self.assertEqual
|
||||
eq(base64.b16encode(b'\x01\x02\xab\xcd\xef'), b'0102ABCDEF')
|
||||
@@ -381,7 +386,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
b'0102ABCDEF')
|
||||
self.check_encode_type_errors(base64.b16encode)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 15 out of range for slice of length 12',")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b16decode(self):
|
||||
eq = self.assertEqual
|
||||
eq(base64.b16decode(b'0102ABCDEF'), b'\x01\x02\xab\xcd\xef')
|
||||
@@ -409,7 +415,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
# Incorrect "padding"
|
||||
self.assertRaises(binascii.Error, base64.b16decode, '010')
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 19 out of range for slice of length 16'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_a85encode(self):
|
||||
eq = self.assertEqual
|
||||
|
||||
@@ -460,7 +467,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
eq(base64.a85encode(b' '*6, foldspaces=True, adobe=False), b'y+<U')
|
||||
eq(base64.a85encode(b' '*5, foldspaces=True, adobe=False), b'y+9')
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 19 out of range for slice of length 16'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b85encode(self):
|
||||
eq = self.assertEqual
|
||||
|
||||
@@ -495,7 +503,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
self.check_other_types(base64.b85encode, b"www.python.org",
|
||||
b'cXxL#aCvlSZ*DGca%T')
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 23 out of range for slice of length 20'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_a85decode(self):
|
||||
eq = self.assertEqual
|
||||
|
||||
@@ -541,7 +550,8 @@ class BaseXYTestCase(unittest.TestCase):
|
||||
self.check_other_types(base64.a85decode, b'GB\\6`E-ZP=Df.1GEb>',
|
||||
b"www.python.org")
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'range end index 23 out of range for slice of length 20'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_b85decode(self):
|
||||
eq = self.assertEqual
|
||||
|
||||
|
||||
Vendored
+40
-4
@@ -198,7 +198,6 @@ class BaseStrTest:
|
||||
s += _('A')
|
||||
self.assertFalse(s.islower())
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, test failed only in BytesTest")
|
||||
@bigmemtest(size=_2G, memuse=2)
|
||||
def test_isspace(self, size):
|
||||
_ = self.from_latin1
|
||||
@@ -209,7 +208,6 @@ class BaseStrTest:
|
||||
s += _('j')
|
||||
self.assertFalse(s.isspace())
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, test failed only in BytesTest")
|
||||
@bigmemtest(size=_2G, memuse=2)
|
||||
def test_istitle(self, size):
|
||||
_ = self.from_latin1
|
||||
@@ -259,7 +257,6 @@ class BaseStrTest:
|
||||
self.assertEqual(len(s), size)
|
||||
self.assertEqual(s.count(_('a')), size)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, test failed only in BytesTest")
|
||||
@bigmemtest(size=_2G + 10, memuse=1)
|
||||
def test_lstrip(self, size):
|
||||
_ = self.from_latin1
|
||||
@@ -332,7 +329,6 @@ class BaseStrTest:
|
||||
self.assertEqual(len(s), size)
|
||||
self.assertEqual(s.strip(), SUBSTR.strip())
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, test failed only in BytesTest")
|
||||
@bigmemtest(size=_2G + 10, memuse=1)
|
||||
def test_rstrip(self, size):
|
||||
_ = self.from_latin1
|
||||
@@ -769,6 +765,16 @@ class StrTest(unittest.TestCase, BaseStrTest):
|
||||
self.assertEqual(s.count(_('!')), repeats * 2)
|
||||
self.assertEqual(s.count(_('z')), repeats * 3)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_lstrip(self, size):
|
||||
super().test_lstrip(size)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_rstrip(self, size):
|
||||
super().test_rstrip(size)
|
||||
|
||||
|
||||
class BytesTest(unittest.TestCase, BaseStrTest):
|
||||
|
||||
@@ -792,6 +798,26 @@ class BytesTest(unittest.TestCase, BaseStrTest):
|
||||
def test_swapcase(self, size):
|
||||
self._test_swapcase(size)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_isspace(self, size):
|
||||
super().test_isspace(size)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_istitle(self, size):
|
||||
super().test_istitle(size)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_lstrip(self, size):
|
||||
super().test_lstrip(size)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_rstrip(self, size):
|
||||
super().test_rstrip(size)
|
||||
|
||||
|
||||
class BytearrayTest(unittest.TestCase, BaseStrTest):
|
||||
|
||||
@@ -818,6 +844,16 @@ class BytearrayTest(unittest.TestCase, BaseStrTest):
|
||||
test_hash = None
|
||||
test_split_large = None
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_isspace(self, size):
|
||||
super().test_isspace(size)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_istitle(self, size):
|
||||
super().test_istitle(size)
|
||||
|
||||
class TupleTest(unittest.TestCase):
|
||||
|
||||
# Tuples have a small, fixed-sized head and an array of pointers to
|
||||
|
||||
Vendored
+4
-2
@@ -22,7 +22,8 @@ class BinHexTestCase(unittest.TestCase):
|
||||
|
||||
DATA = b'Jack is my hero'
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'binascii' has no attribute 'crc_hqx'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_binhex(self):
|
||||
with open(self.fname1, 'wb') as f:
|
||||
f.write(self.DATA)
|
||||
@@ -46,7 +47,8 @@ class BinHexTestCase(unittest.TestCase):
|
||||
|
||||
self.assertRaises(binhex.Error, binhex.binhex, self.fname3, self.fname2)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'binascii' has no attribute 'crc_hqx'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_binhex_line_endings(self):
|
||||
# bpo-29566: Ensure the line endings are those for macOS 9
|
||||
with open(self.fname1, 'wb') as f:
|
||||
|
||||
Vendored
-1
@@ -492,7 +492,6 @@ def testfunction_kw(self, *, kw):
|
||||
return self
|
||||
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, vectorcall support")
|
||||
class TestPEP590(unittest.TestCase):
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
|
||||
Vendored
+13
-8
@@ -74,7 +74,8 @@ class CmdLineTest(unittest.TestCase):
|
||||
rc, out, err = assert_python_ok('-vv')
|
||||
self.assertNotIn(b'stack overflow', err)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: unexpected type bytes")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
@unittest.skipIf(interpreter_requires_environment(),
|
||||
'Cannot run -E tests when PYTHON env vars are required.')
|
||||
def test_xoptions(self):
|
||||
@@ -203,8 +204,7 @@ class CmdLineTest(unittest.TestCase):
|
||||
if not stdout.startswith(pattern):
|
||||
raise AssertionError("%a doesn't start with %a" % (stdout, pattern))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'unexpected invalid UTF-8 code point'")
|
||||
@unittest.skipIf(sys.platform == 'win32',
|
||||
'Windows has a native unicode API')
|
||||
def test_invalid_utf8_arg(self):
|
||||
@@ -463,19 +463,23 @@ class CmdLineTest(unittest.TestCase):
|
||||
self.assertEqual(support.strip_python_stderr(err), b'')
|
||||
self.assertEqual(p.returncode, 42)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, NotImplementedError: preexec_fn not supported yet")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_no_stdin(self):
|
||||
self._test_no_stdio(['stdin'])
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, NotImplementedError: preexec_fn not supported yet")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_no_stdout(self):
|
||||
self._test_no_stdio(['stdout'])
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, NotImplementedError: preexec_fn not supported yet")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_no_stderr(self):
|
||||
self._test_no_stdio(['stderr'])
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, NotImplementedError: preexec_fn not supported yet")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_no_std_streams(self):
|
||||
self._test_no_stdio(['stdin', 'stdout', 'stderr'])
|
||||
|
||||
@@ -771,7 +775,8 @@ class CmdLineTest(unittest.TestCase):
|
||||
self.assertEqual(proc.stdout.rstrip(), name)
|
||||
self.assertEqual(proc.returncode, 0)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, No module named '_testcapi'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_pythonmalloc(self):
|
||||
# Test the PYTHONMALLOC environment variable
|
||||
pymalloc = support.with_pymalloc()
|
||||
|
||||
Vendored
+12
-5
@@ -281,7 +281,8 @@ class CmdLineTest(unittest.TestCase):
|
||||
self._check_script(zip_name, run_name, zip_name, zip_name, '',
|
||||
zipimport.zipimporter)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: object of type 'NoneType' has no len()")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_zipfile_compiled_checked_hash(self):
|
||||
with support.temp_dir() as script_dir:
|
||||
script_name = _make_test_script(script_dir, '__main__')
|
||||
@@ -292,7 +293,8 @@ class CmdLineTest(unittest.TestCase):
|
||||
self._check_script(zip_name, run_name, zip_name, zip_name, '',
|
||||
zipimport.zipimporter)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: object of type 'NoneType' has no len()")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_zipfile_compiled_unchecked_hash(self):
|
||||
with support.temp_dir() as script_dir:
|
||||
script_name = _make_test_script(script_dir, '__main__')
|
||||
@@ -548,7 +550,6 @@ class CmdLineTest(unittest.TestCase):
|
||||
self.assertTrue(text[1].startswith(' File '))
|
||||
self.assertTrue(text[3].startswith('NameError'))
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: Expected type 'str', not 'bytes'")
|
||||
def test_non_ascii(self):
|
||||
# Mac OS X denies the creation of a file with an invalid UTF-8 name.
|
||||
# Windows allows creating a name with an arbitrary bytes name, but
|
||||
@@ -572,6 +573,10 @@ class CmdLineTest(unittest.TestCase):
|
||||
'stdout=%r stderr=%r' % (stdout, stderr))
|
||||
self.assertEqual(0, rc)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
if sys.platform == "linux":
|
||||
test_non_ascii = unittest.expectedFailure(test_non_ascii)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_issue20500_exit_with_exception_value(self):
|
||||
@@ -592,7 +597,8 @@ class CmdLineTest(unittest.TestCase):
|
||||
text = stderr.decode('ascii')
|
||||
self.assertEqual(text, "some text")
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, UnicodeDecodeError")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_syntaxerror_unindented_caret_position(self):
|
||||
script = "1 + 1 = 2\n"
|
||||
with support.temp_dir() as script_dir:
|
||||
@@ -602,7 +608,8 @@ class CmdLineTest(unittest.TestCase):
|
||||
# Confirm that the caret is located under the first 1 character
|
||||
self.assertIn("\n 1 + 1 = 2\n ^", text)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, UnicodeDecodeError")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_syntaxerror_indented_caret_position(self):
|
||||
script = textwrap.dedent("""\
|
||||
if True:
|
||||
|
||||
Vendored
+14
-7
@@ -190,7 +190,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
self.assertRaises(UnicodeDecodeError, sin.decode,
|
||||
"utf-8", "test.relaxedutf8")
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: character mapping must return integer, None or str")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_charmapencode(self):
|
||||
# For charmap encodings the replacement string will be
|
||||
# mapped through the encoding again. This means, that
|
||||
@@ -269,7 +270,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
b"g[<252><223>]"
|
||||
)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, AttributeError: module 'codecs' has no attribute 'utf_32_encode'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_longstrings(self):
|
||||
# test long strings to check for memory overflow problems
|
||||
errors = [ "strict", "ignore", "replace", "xmlcharrefreplace",
|
||||
@@ -452,7 +454,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
("", 2)
|
||||
)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, AttributeError: attribute 'object' of 'BadObjectUnicodeEncodeError' objects is not writable")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_badandgoodreplaceexceptions(self):
|
||||
# "replace" complains about a non-exception passed in
|
||||
self.assertRaises(
|
||||
@@ -532,7 +535,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
("".join("&#%d;" % c for c in cs), 1 + len(s))
|
||||
)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: Expected type 'bytes', not 'bytearray'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_badandgoodbackslashreplaceexceptions(self):
|
||||
# "backslashreplace" complains about a non-exception passed in
|
||||
self.assertRaises(
|
||||
@@ -639,7 +643,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
(r, 1 + len(s))
|
||||
)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, UnicodeEncodeError: ('ascii', 'a�b', 1, 2, 'ouch')")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_badandgoodsurrogateescapeexceptions(self):
|
||||
surrogateescape_errors = codecs.lookup_error('surrogateescape')
|
||||
# "surrogateescape" complains about a non-exception passed in
|
||||
@@ -684,7 +689,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
("\udc80", 2)
|
||||
)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: Expected type 'str', not 'bytes'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_badandgoodsurrogatepassexceptions(self):
|
||||
surrogatepass_errors = codecs.lookup_error('surrogatepass')
|
||||
# "surrogatepass" complains about a non-exception passed in
|
||||
@@ -987,7 +993,8 @@ class CodecCallbackTest(unittest.TestCase):
|
||||
text = 'abc<def>ghi'*n
|
||||
text.translate(charmap)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, AttributeError: attribute 'object' of 'UnicodeDecodeError' objects is not writable")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_mutatingdecodehandler(self):
|
||||
baddata = [
|
||||
("ascii", b"\xff"),
|
||||
|
||||
Vendored
+2
-1
@@ -127,7 +127,8 @@ class CodeopTests(unittest.TestCase):
|
||||
av("def f():\n pass\n#foo\n")
|
||||
av("@a.b.c\ndef f():\n pass\n")
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON (SyntaxError: Got unexpected EOF at line 4 column 1)")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_incomplete(self):
|
||||
ai = self.assertIncomplete
|
||||
|
||||
|
||||
Vendored
+4
-2
@@ -141,7 +141,8 @@ class ContextManagerTestCase(unittest.TestCase):
|
||||
else:
|
||||
self.fail('StopIteration was suppressed')
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, SyntaxError: future feature generator_stop is not defined at line 1 column 1")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_contextmanager_except_pep479(self):
|
||||
code = """\
|
||||
from __future__ import generator_stop
|
||||
@@ -569,7 +570,8 @@ class TestBaseExitStack:
|
||||
with self.exit_stack():
|
||||
pass
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: Got multiple values for argument 'self'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_callback(self):
|
||||
expected = [
|
||||
((), {}),
|
||||
|
||||
Vendored
+8
-4
@@ -1829,7 +1829,8 @@ class TestCase(unittest.TestCase):
|
||||
'does not support item assignment'):
|
||||
fields(C)[0].metadata['test'] = 3
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: object of type 'mappingproxy' has no len()")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_field_metadata_custom_mapping(self):
|
||||
# Try a custom mapping.
|
||||
class SimpleNameSpace:
|
||||
@@ -1910,7 +1911,8 @@ class TestCase(unittest.TestCase):
|
||||
# Check MRO resolution.
|
||||
self.assertEqual(Child.__mro__, (Child, Parent, Generic, object))
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, pickle.PicklingError")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_dataclassses_pickleable(self):
|
||||
global P, Q, R
|
||||
@dataclass
|
||||
@@ -2943,7 +2945,8 @@ class TestStringAnnotations(unittest.TestCase):
|
||||
# x is not an InitVar, so there will be a member x.
|
||||
self.assertEqual(C(10).x, 10)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, ImportError: cannot import name 'dataclass_module_1'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_classvar_module_level_import(self):
|
||||
from test import dataclass_module_1
|
||||
from test import dataclass_module_1_str
|
||||
@@ -2985,7 +2988,8 @@ class TestStringAnnotations(unittest.TestCase):
|
||||
# won't exist on the instance.
|
||||
self.assertNotIn('not_iv4', c.__dict__)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, ImportError: cannot import name 'dataclass_textanno'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_text_annotations(self):
|
||||
from test import dataclass_textanno
|
||||
|
||||
|
||||
Vendored
+6
-4
@@ -80,7 +80,6 @@ class DictSetTest(unittest.TestCase):
|
||||
self.assertEqual(set(values), {10, "ABC"})
|
||||
self.assertEqual(len(values), 2)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: '&' not supported between instances of 'dict_keys' and 'dict_keys'")
|
||||
def test_dict_repr(self):
|
||||
d = {1: 10, "a": "ABC"}
|
||||
self.assertIsInstance(repr(d), str)
|
||||
@@ -97,7 +96,8 @@ class DictSetTest(unittest.TestCase):
|
||||
self.assertTrue(r == "dict_values(['ABC', 10])" or
|
||||
r == "dict_values([10, 'ABC'])")
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: '&' not supported between instances of 'dict_items' and 'dict_items'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_keys_set_operations(self):
|
||||
d1 = {'a': 1, 'b': 2}
|
||||
d2 = {'b': 3, 'c': 2}
|
||||
@@ -154,7 +154,8 @@ class DictSetTest(unittest.TestCase):
|
||||
self.assertTrue(de.keys().isdisjoint(de.keys()))
|
||||
self.assertTrue(de.keys().isdisjoint([1]))
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, TypeError: '&' not supported between instances of 'dict_items' and 'dict_items'")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_items_set_operations(self):
|
||||
d1 = {'a': 1, 'b': 2}
|
||||
d2 = {'a': 2, 'b': 2}
|
||||
@@ -239,7 +240,8 @@ class DictSetTest(unittest.TestCase):
|
||||
self.assertRaises(TypeError, copy.copy, d.values())
|
||||
self.assertRaises(TypeError, copy.copy, d.items())
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, DictSetTest.test_compare_error.<locals>.Exc")
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_compare_error(self):
|
||||
class Exc(Exception):
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user