Unskip tests in test_io

This commit is contained in:
Padraic Fanning
2021-02-25 21:28:54 -05:00
parent 18491e7bb8
commit 884c189bf6

View File

@@ -2600,8 +2600,8 @@ class TextIOWrapperTest(unittest.TestCase):
def tearDown(self):
support.unlink(support.TESTFN)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest fails while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'line_buffering'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_constructor(self):
r = self.BytesIO(b"\xc3\xa9\n\n")
b = self.BufferedReader(r, 1000)
@@ -2616,7 +2616,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertRaises(TypeError, t.__init__, b, newline=42)
self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_uninitialized(self):
t = self.TextIOWrapper.__new__(self.TextIOWrapper)
del t
@@ -2628,7 +2627,6 @@ class TextIOWrapperTest(unittest.TestCase):
t.__init__(self.MockRawIO())
self.assertEqual(t.read(0), '')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_non_text_encoding_codecs_are_rejected(self):
# Ensure the constructor complains if passed a codec that isn't
# marked as a text encoding
@@ -2638,9 +2636,8 @@ class TextIOWrapperTest(unittest.TestCase):
with self.assertRaisesRegex(LookupError, "is not a text encoding"):
self.TextIOWrapper(b, encoding="hex")
@unittest.skip("TODO: RUSTPYTHON, "
"AttributeError: 'TextIOWrapper' object has no attribute 'detach'; "
"BufferError: Existing exports of data: object cannot be re-sized")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_detach(self):
r = self.BytesIO()
b = self.BufferedWriter(r)
@@ -2661,7 +2658,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertFalse(t.line_buffering)
self.assertFalse(t.write_through)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_repr(self):
raw = self.BytesIO("hello".encode("utf-8"))
b = self.BufferedReader(raw)
@@ -2692,9 +2688,8 @@ class TextIOWrapperTest(unittest.TestCase):
except RuntimeError:
pass
@unittest.skip("TODO: RUSTPYTHON, "
"TypeError: Unexpected keyword argument line_buffering; "
"BufferError: Existing exports of data: object cannot be re-sized")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_line_buffering(self):
r = self.BytesIO()
b = self.BufferedWriter(r, 1000)
@@ -2706,9 +2701,8 @@ class TextIOWrapperTest(unittest.TestCase):
t.write("A\rB")
self.assertEqual(r.getvalue(), b"XY\nZA\rB")
@unittest.skip("TODO: RUSTPYTHON, "
"TypeError: Unexpected keyword argument line_buffering; "
"BufferError: Existing exports of data: object cannot be re-sized")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_line_buffering(self):
r = self.BytesIO()
b = self.BufferedWriter(r, 1000)
@@ -2775,8 +2769,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertIsNotNone(t.encoding)
codecs.lookup(t.encoding)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"UnicodeDecodeError: cannot decode byte at index: 4")
def test_encoding_errors_reading(self):
# (1) default
b = self.BytesIO(b"abc\n\xff\n")
@@ -2795,7 +2787,6 @@ class TextIOWrapperTest(unittest.TestCase):
t = self.TextIOWrapper(b, encoding="ascii", errors="replace")
self.assertEqual(t.read(), "abc\n\ufffd\n")
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_encoding_errors_writing(self):
# (1) default
b = self.BytesIO()
@@ -2820,7 +2811,6 @@ class TextIOWrapperTest(unittest.TestCase):
t.flush()
self.assertEqual(b.getvalue(), b"abc?def\n")
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_newlines(self):
input_lines = [ "unix\n", "windows\r\n", "os9\r", "last\n", "nonl" ]
@@ -2863,7 +2853,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(got_line, exp_line)
self.assertEqual(len(got_lines), len(exp_lines))
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_newlines_input(self):
testdata = b"AAA\nBB\x00B\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
normalized = testdata.replace(b"\r\n", b"\n").replace(b"\r", b"\n")
@@ -2880,7 +2869,6 @@ class TextIOWrapperTest(unittest.TestCase):
txt.seek(0)
self.assertEqual(txt.read(), "".join(expected))
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_newlines_output(self):
testdict = {
"": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
@@ -2913,7 +2901,6 @@ class TextIOWrapperTest(unittest.TestCase):
support.gc_collect()
self.assertEqual([b"abc"], l)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_override_destructor(self):
record = []
class MyTextIO(self.TextIOWrapper):
@@ -2954,9 +2941,8 @@ class TextIOWrapperTest(unittest.TestCase):
# Systematic tests of the text I/O API
@unittest.skip("TODO: RUSTPYTHON, "
"io.UnsupportedOperation: TextIOWrapper.truncate() not supported; "
"OSError: can't reconstruct logical file position")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_basic_io(self):
for chunksize in (1, 2, 3, 4, 5, 15, 16, 17, 31, 32, 33, 63, 64, 65):
for enc in "ascii", "latin-1", "utf-8" :# , "utf-16-be", "utf-16-le":
@@ -3030,7 +3016,8 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(f.tell(), p2)
f.close()
@unittest.skip("TODO: RUSTPYTHON, AttributeError: 'TextIOWrapper' object has no attribute '_CHUNK_SIZE'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_seeking(self):
chunk_size = _default_chunk_size()
prefix_size = chunk_size - 2
@@ -3048,9 +3035,8 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(f.tell(), prefix_size)
self.assertEqual(f.readline(), u_suffix)
@unittest.skip("TODO: RUSTPYTHON, "
"AttributeError: 'TextIOWrapper' object has no attribute '_CHUNK_SIZE'; "
"OSError: can't reconstruct logical file position")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_seeking_too(self):
# Regression test for a specific bug
data = b'\xe0\xbf\xbf\n'
@@ -3109,8 +3095,6 @@ class TextIOWrapperTest(unittest.TestCase):
finally:
StatefulIncrementalDecoder.codecEnabled = 0
@unittest.skip("TODO: RUSTPYTHON, CTextIOWrapperTest passes while PyTextIOWrapperTest errors: "
"LookupError: unknown encoding: euc_jp")
def test_multibyte_seek_and_tell(self):
f = self.open(support.TESTFN, "w", encoding="euc_jp")
f.write("AB\n\u3046\u3048\n")
@@ -3126,8 +3110,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(f.tell(), p1)
f.close()
@unittest.skip("TODO: RUSTPYTHON, CTextIOWrapperTest passes while PyTextIOWrapperTest errors: "
"LookupError: unknown encoding: euc_jis_2004")
def test_seek_with_encoder_state(self):
f = self.open(support.TESTFN, "w", encoding="euc_jis_2004")
f.write("\u00e6\u0300")
@@ -3141,8 +3123,8 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(f.readline(), "\u00e6\u0300\u0300")
f.close()
@unittest.skip("TODO: RUSTPYTHON, CTextIOWrapperTest fails while PyTextIOWrapperTest errors: "
"AttributeError: module 'codecs' has no attribute 'utf_32_encode'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_encoded_writes(self):
data = "1234567890"
tests = ("utf-16",
@@ -3170,7 +3152,6 @@ class TextIOWrapperTest(unittest.TestCase):
txt = self.TextIOWrapper(UnReadable())
self.assertRaises(OSError, txt.read)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_read_one_by_one(self):
txt = self.TextIOWrapper(self.BytesIO(b"AA\r\nBB"))
reads = ""
@@ -3189,7 +3170,6 @@ class TextIOWrapperTest(unittest.TestCase):
txt.seek(0)
self.assertEqual(txt.readlines(5), ["AA\n", "BB\n"])
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
# read in amounts equal to TextIOWrapper._CHUNK_SIZE which is 128.
def test_read_by_chunk(self):
# make sure "\r\n" straddles 128 char boundary.
@@ -3224,7 +3204,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertRaises(TypeError, txt.writelines, None)
self.assertRaises(TypeError, txt.writelines, b'abc')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_issue1395_1(self):
txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -3237,7 +3216,6 @@ class TextIOWrapperTest(unittest.TestCase):
reads += c
self.assertEqual(reads, self.normalized)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_issue1395_2(self):
txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
txt._CHUNK_SIZE = 4
@@ -3250,7 +3228,6 @@ class TextIOWrapperTest(unittest.TestCase):
reads += c
self.assertEqual(reads, self.normalized)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_issue1395_3(self):
txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
txt._CHUNK_SIZE = 4
@@ -3262,7 +3239,6 @@ class TextIOWrapperTest(unittest.TestCase):
reads += txt.readline()
self.assertEqual(reads, self.normalized)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_issue1395_4(self):
txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
txt._CHUNK_SIZE = 4
@@ -3271,7 +3247,6 @@ class TextIOWrapperTest(unittest.TestCase):
reads += txt.read()
self.assertEqual(reads, self.normalized)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_issue1395_5(self):
txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
txt._CHUNK_SIZE = 4
@@ -3282,15 +3257,14 @@ class TextIOWrapperTest(unittest.TestCase):
txt.seek(pos)
self.assertEqual(txt.read(4), "BBB\n")
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_issue2282(self):
buffer = self.BytesIO(self.testdata)
txt = self.TextIOWrapper(buffer, encoding="ascii")
self.assertEqual(buffer.seekable(), txt.seekable())
@unittest.skip("TODO: RUSTPYTHON, CTextIOWrapperTest fails while PyTextIOWrapperTest errors:"
"AttributeError: module 'codecs' has no attribute 'utf_32_encode'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_append_bom(self):
# The BOM is not written again when appending to a non-empty file
filename = support.TESTFN
@@ -3306,8 +3280,8 @@ class TextIOWrapperTest(unittest.TestCase):
with self.open(filename, 'rb') as f:
self.assertEqual(f.read(), 'aaaxxx'.encode(charset))
@unittest.skip("TODO: RUSTPYTHON, CTextIOWrapperTest fails while PyTextIOWrapperTest errors:"
"AttributeError: module 'codecs' has no attribute 'utf_32_encode'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_seek_bom(self):
# Same test, but when seeking manually
filename = support.TESTFN
@@ -3323,8 +3297,8 @@ class TextIOWrapperTest(unittest.TestCase):
with self.open(filename, 'rb') as f:
self.assertEqual(f.read(), 'bbbzzz'.encode(charset))
@unittest.skip("TODO: RUSTPYTHON, CTextIOWrapperTest fails while PyTextIOWrapperTest errors:"
"AttributeError: module 'codecs' has no attribute 'utf_32_encode'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_seek_append_bom(self):
# Same test, but first seek to the start and then to the end
filename = support.TESTFN
@@ -3362,7 +3336,6 @@ class TextIOWrapperTest(unittest.TestCase):
for n in range(20):
self.assertEqual(content.count("Thread%03d\n" % n), 1)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_flush_error_on_close(self):
# Test that text file is closed despite failed flush
# and that flush() is called before file closed.
@@ -3380,7 +3353,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertFalse(closed[1])
txt.flush = lambda: None # break reference loop
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_close_error_on_close(self):
buffer = self.BytesIO(self.testdata)
def bad_flush():
@@ -3401,7 +3373,6 @@ class TextIOWrapperTest(unittest.TestCase):
buffer.close = lambda: None
txt.flush = lambda: None
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_nonnormalized_close_error_on_close(self):
# Issue #21677
buffer = self.BytesIO(self.testdata)
@@ -3441,7 +3412,6 @@ class TextIOWrapperTest(unittest.TestCase):
with self.assertRaises(AttributeError):
txt.buffer = buf
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_rawio(self):
# Issue #12591: TextIOWrapper must work with raw I/O objects, so
# that subprocess.Popen() can have the required unbuffered
@@ -3453,8 +3423,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(txt.readline(), 'efghi\n')
self.assertEqual(list(txt), ['jkl\n', 'opq\n'])
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"TypeError: Unexpected keyword argument write_through")
def test_rawio_write_through(self):
# Issue #12591: with write_through=True, writes don't need a flush
raw = self.MockRawIO([b'abc', b'def', b'ghi\njkl\nopq\n'])
@@ -3465,9 +3433,8 @@ class TextIOWrapperTest(unittest.TestCase):
txt.write('5')
self.assertEqual(b''.join(raw._write_stack), b'123\n45')
@unittest.skip("TODO: RUSTPYTHON, "
"TypeError: Unexpected keyword argument write_through; "
"BufferError: Existing exports of data: object cannot be re-sized")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_bufio_write_through(self):
# Issue #21396: write_through=True doesn't force a flush()
# on the underlying binary buffered object.
@@ -3500,8 +3467,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertTrue(write_called)
self.assertEqual(rawio.getvalue(), data * 11) # all flushed
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'reconfigure'")
def test_reconfigure_write_through(self):
raw = self.MockRawIO([])
t = self.TextIOWrapper(raw, encoding='ascii', newline='\n')
@@ -3545,7 +3510,6 @@ class TextIOWrapperTest(unittest.TestCase):
t = io.TextIOWrapper(io.BytesIO(b'foo'), encoding="rot13")
self.assertRaises(TypeError, t.write, 'bar')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest fails")
def test_illegal_decoder(self):
# Issue #17106
# Bypass the early encoding check added in issue 20404
@@ -3654,8 +3618,8 @@ class TextIOWrapperTest(unittest.TestCase):
F.tell = lambda x: 0
t = self.TextIOWrapper(F(), encoding='utf-8')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest fails while CTextIOWrapperTest errors: "
"UnicodeDecodeError: cannot decode byte at index: 3")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_encoding_read(self):
# latin1 -> utf8
# (latin1 can decode utf-8 encoded string)
@@ -3668,8 +3632,6 @@ class TextIOWrapperTest(unittest.TestCase):
with self.assertRaises(self.UnsupportedOperation):
txt.reconfigure(newline=None)
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'reconfigure'")
def test_reconfigure_write_fromascii(self):
# ascii has a specific encodefunc in the C implementation,
# but utf-8-sig has not. Make sure that we get rid of the
@@ -3682,8 +3644,6 @@ class TextIOWrapperTest(unittest.TestCase):
txt.flush()
self.assertEqual(raw.getvalue(), b'foo\n\xc3\xa9\n')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'reconfigure'")
def test_reconfigure_write(self):
# latin -> utf8
raw = self.BytesIO()
@@ -3705,8 +3665,6 @@ class TextIOWrapperTest(unittest.TestCase):
txt.flush()
self.assertEqual(raw.getvalue(), b'abc\nd\xc3\xa9f\n')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'reconfigure'")
def test_reconfigure_write_non_seekable(self):
raw = self.BytesIO()
raw.seekable = lambda: False
@@ -3720,8 +3678,6 @@ class TextIOWrapperTest(unittest.TestCase):
# If the raw stream is not seekable, there'll be a BOM
self.assertEqual(raw.getvalue(), b'abc\n\xef\xbb\xbfd\xc3\xa9f\n')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'reconfigure'")
def test_reconfigure_defaults(self):
txt = self.TextIOWrapper(self.BytesIO(), 'ascii', 'replace', '\n')
txt.reconfigure(encoding=None)
@@ -3745,8 +3701,6 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertEqual(txt.detach().getvalue(), b'LF\nCRLF\r\n')
@unittest.skip("TODO: RUSTPYTHON, PyTextIOWrapperTest passes while CTextIOWrapperTest errors: "
"AttributeError: 'TextIOWrapper' object has no attribute 'reconfigure'")
def test_reconfigure_newline(self):
raw = self.BytesIO(b'CR\rEOF')
txt = self.TextIOWrapper(raw, 'ascii', newline='\n')
@@ -3818,6 +3772,151 @@ class CTextIOWrapperTest(TextIOWrapperTest):
io = io
shutdown_error = "RuntimeError: could not find io module state"
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_uninitialized(self):
super().test_uninitialized()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_non_text_encoding_codecs_are_rejected(self):
super().test_non_text_encoding_codecs_are_rejected()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_repr(self):
super().test_repr()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_encoding_errors_reading(self):
super().test_encoding_errors_reading()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_encoding_errors_writing(self):
super().test_encoding_errors_writing()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_newlines(self):
super().test_newlines()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_newlines_input(self):
super().test_newlines_input()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_newlines_output(self):
super().test_newlines_output()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_override_destructor(self):
super().test_override_destructor()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_read_one_by_one(self):
super().test_read_one_by_one()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_read_by_chunk(self):
super().test_read_by_chunk()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_issue1395_1(self):
super().test_issue1395_1()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_issue1395_2(self):
super().test_issue1395_2()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_issue1395_3(self):
super().test_issue1395_3()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_issue1395_4(self):
super().test_issue1395_4()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_issue1395_5(self):
super().test_issue1395_5()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_issue2282(self):
super().test_issue2282()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_flush_error_on_close(self):
super().test_flush_error_on_close()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_close_error_on_close(self):
super().test_close_error_on_close()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_nonnormalized_close_error_on_close(self):
super().test_nonnormalized_close_error_on_close()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_rawio(self):
super().test_rawio()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_rawio_write_through(self):
super().test_rawio_write_through()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_write_through(self):
super().test_reconfigure_write_through()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_illegal_decoder(self):
super().test_illegal_decoder()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_write_fromascii(self):
super().test_reconfigure_write_fromascii()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_write(self):
super().test_reconfigure_write()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_write_non_seekable(self):
super().test_reconfigure_write_non_seekable()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_defaults(self):
super().test_reconfigure_defaults()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_reconfigure_newline(self):
super().test_reconfigure_newline()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_initialization(self):
@@ -3863,7 +3962,8 @@ class CTextIOWrapperTest(TextIOWrapperTest):
t2.buddy = t1
support.gc_collect()
@unittest.skip("TODO: RUSTPYTHON, KeyError: '_CHUNK_SIZE'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_del__CHUNK_SIZE_SystemError(self):
t = self.TextIOWrapper(self.BytesIO(), encoding='ascii')
with self.assertRaises(AttributeError):
@@ -3874,6 +3974,21 @@ class PyTextIOWrapperTest(TextIOWrapperTest):
io = pyio
shutdown_error = "LookupError: unknown encoding: ascii"
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_newlines(self):
super().test_newlines()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_seek_with_encoder_state(self):
super().test_seek_with_encoder_state()
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_multibyte_seek_and_tell(self):
super().test_multibyte_seek_and_tell()
@unittest.skip("TODO: RUSTPYTHON, incremental decoder")
class IncrementalNewlineDecoderTest(unittest.TestCase):
@@ -4214,11 +4329,13 @@ class MiscIOTest(unittest.TestCase):
with self.open(support.TESTFN, **kwargs) as f:
self.assertRaises(TypeError, pickle.dumps, f, protocol)
@unittest.skip("TODO: RUSTPYTHON, OSError: Bad file descriptor (os error 9)")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_nonblock_pipe_write_bigbuf(self):
self._test_nonblock_pipe_write(16*1024)
@unittest.skip("TODO: RUSTPYTHON, BlockingIOError: Resource temporarily unavailable (os error 11)")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_nonblock_pipe_write_smallbuf(self):
self._test_nonblock_pipe_write(1024)
@@ -4427,7 +4544,6 @@ class SignalsTest(unittest.TestCase):
def test_interrupted_write_buffered(self):
self.check_interrupted_write(b"xy", b"xy", mode="wb")
@unittest.skip("TODO: RUSTPYTHON, CSignalsTest passes while PySignalsTest hangs")
def test_interrupted_write_text(self):
self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii")
@@ -4489,12 +4605,14 @@ class SignalsTest(unittest.TestCase):
os.close(w)
os.close(r)
@unittest.skip("TODO: RUSTPYTHON, OSError: Broken pipe (os error 32)")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_interrupted_read_retry_buffered(self):
self.check_interrupted_read_retry(lambda x: x.decode('latin1'),
mode="rb")
@unittest.skip("TODO: RUSTPYTHON, OSError: Broken pipe (os error 32)")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_interrupted_read_retry_text(self):
self.check_interrupted_read_retry(lambda x: x,
mode="r")
@@ -4587,6 +4705,10 @@ class PySignalsTest(SignalsTest):
test_reentrant_write_buffered = None
test_reentrant_write_text = None
@unittest.skip("TODO: RUSTPYTHON, hangs?")
def test_interrupted_write_text(self):
super().test_interrupted_write_text()
def load_tests(*args):
tests = (CIOTest, PyIOTest, APIMismatchTest,