1 | n/a | from test.test_json import CTest |
---|
2 | n/a | |
---|
3 | n/a | |
---|
4 | n/a | class TestSpeedups(CTest): |
---|
5 | n/a | def test_scanstring(self): |
---|
6 | n/a | self.assertEqual(self.json.decoder.scanstring.__module__, "_json") |
---|
7 | n/a | self.assertIs(self.json.decoder.scanstring, self.json.decoder.c_scanstring) |
---|
8 | n/a | |
---|
9 | n/a | def test_encode_basestring_ascii(self): |
---|
10 | n/a | self.assertEqual(self.json.encoder.encode_basestring_ascii.__module__, |
---|
11 | n/a | "_json") |
---|
12 | n/a | self.assertIs(self.json.encoder.encode_basestring_ascii, |
---|
13 | n/a | self.json.encoder.c_encode_basestring_ascii) |
---|
14 | n/a | |
---|
15 | n/a | |
---|
16 | n/a | class TestDecode(CTest): |
---|
17 | n/a | def test_make_scanner(self): |
---|
18 | n/a | self.assertRaises(AttributeError, self.json.scanner.c_make_scanner, 1) |
---|
19 | n/a | |
---|
20 | n/a | def test_make_encoder(self): |
---|
21 | n/a | self.assertRaises(TypeError, self.json.encoder.c_make_encoder, |
---|
22 | n/a | (True, False), |
---|
23 | n/a | b"\xCD\x7D\x3D\x4E\x12\x4C\xF9\x79\xD7\x52\xBA\x82\xF2\x27\x4A\x7D\xA0\xCA\x75", |
---|
24 | n/a | None) |
---|