PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/Lib/json/tests/test_speedups.py

http://unladen-swallow.googlecode.com/
Python | 15 lines | 12 code | 3 blank | 0 comment | 0 complexity | afd2c6bdb3b339001ca9d7d3007b41a7 MD5 | raw file
 1import decimal
 2from unittest import TestCase
 3
 4from json import decoder
 5from json import encoder
 6
 7class TestSpeedups(TestCase):
 8    def test_scanstring(self):
 9        self.assertEquals(decoder.scanstring.__module__, "_json")
10        self.assert_(decoder.scanstring is decoder.c_scanstring)
11
12    def test_encode_basestring_ascii(self):
13        self.assertEquals(encoder.encode_basestring_ascii.__module__, "_json")
14        self.assert_(encoder.encode_basestring_ascii is
15                          encoder.c_encode_basestring_ascii)