ยปCore Development>Code coverage>Lib/test/test_json/test_speedups.py

Python code coverage for Lib/test/test_json/test_speedups.py

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