]> git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.10/Lib/json/tests/test_speedups.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Lib / json / tests / test_speedups.py
1 from json.tests import CTest
2
3
4 class TestSpeedups(CTest):
5 def test_scanstring(self):
6 self.assertEqual(self.json.decoder.scanstring.__module__, "_json")
7 self.assertIs(self.json.decoder.scanstring, self.json.decoder.c_scanstring)
8
9 def test_encode_basestring_ascii(self):
10 self.assertEqual(self.json.encoder.encode_basestring_ascii.__module__,
11 "_json")
12 self.assertIs(self.json.encoder.encode_basestring_ascii,
13 self.json.encoder.c_encode_basestring_ascii)
14
15 class TestDecode(CTest):
16 def test_make_scanner(self):
17 self.assertRaises(AttributeError, self.json.scanner.c_make_scanner, 1)
18
19 def test_make_encoder(self):
20 self.assertRaises(TypeError, self.json.encoder.c_make_encoder,
21 None,
22 "\xCD\x7D\x3D\x4E\x12\x4C\xF9\x79\xD7\x52\xBA\x82\xF2\x27\x4A\x7D\xA0\xCA\x75",
23 None)