mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Unskip tests in test_json.test_scanstring
This commit is contained in:
1 file changed
+10
-8
@@ -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
|
||||
Reference in new issue
Block a user