From 63c3a306c4d099e3fd805cea27b396ec00ac7a22 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Thu, 25 Feb 2021 21:39:08 -0500 Subject: [PATCH] Unskip tests in test_json.test_scanstring --- Lib/test/test_json/test_scanstring.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Lib/test/test_json/test_scanstring.py b/Lib/test/test_json/test_scanstring.py index d19b86e34..140a7c12a 100644 --- a/Lib/test/test_json/test_scanstring.py +++ b/Lib/test/test_json/test_scanstring.py @@ -86,9 +86,8 @@ class TestScanstring: scanstring('["Bad value", truth]', 2, True), ('Bad value', 12)) - @unittest.skip("TODO: RUSTPYTHON, " - "json.decoder.JSONDecodeError: unpaired surrogate: line 1 column 3 (char 2); " - "ValueError: chr() arg not in range(0x110000)") + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_surrogates(self): scanstring = self.json.decoder.scanstring def assertScan(given, expect): @@ -105,8 +104,6 @@ class TestScanstring: assertScan('"z\ud834\\udd20x"', 'z\ud834\udd20x') assertScan('"z\ud834x"', 'z\ud834x') - @unittest.skip("TODO: RUSTPYTHON, TestCScanstring passes while TestPyScanstring errors: " - "ValueError: chr() arg not in range(0x110000)") def test_bad_escapes(self): scanstring = self.json.decoder.scanstring bad_escapes = [ @@ -138,13 +135,18 @@ class TestScanstring: with self.assertRaises(self.JSONDecodeError, msg=s): scanstring(s, 1, True) - @unittest.skip("TODO: RUSTPYTHON, " - "TypeError: Expected type 'str', not 'bytes'; " - "TypeError: expected string") + # TODO: RUSTPYTHON + @unittest.expectedFailure def test_overflow(self): with self.assertRaises(OverflowError): self.json.decoder.scanstring(b"xxx", sys.maxsize+1) class TestPyScanstring(TestScanstring, PyTest): pass +# TODO: RUSTPYTHON +class TestPyScanstring(TestScanstring, PyTest): + # TODO: RUSTPYTHON + @unittest.expectedFailure + def test_bad_escapes(self): + super().test_bad_escapes() class TestCScanstring(TestScanstring, CTest): pass