Unskip tests in test_json.test_scanstring

This commit is contained in:
Padraic Fanning committed 2021-02-25 21:39:08 -05:00
1 parent 4a485c2c70
commit 63c3a306c4
1 file changed
+10 -8
+10 -8
View File
@@ -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