diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2013-09-29 05:12:56 -0400 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2013-09-29 05:12:56 -0400 |
| commit | 19346fa9068878af516cdb670bea4f791337507b (patch) | |
| tree | 54d4fa5a82b2e0305f3b050dc1ebb53ec9d82a5d /simplejson/tests/test_speedups.py | |
| download | lastfm-19346fa9068878af516cdb670bea4f791337507b.tar.gz | |
Initial commit
Diffstat (limited to 'simplejson/tests/test_speedups.py')
| -rw-r--r-- | simplejson/tests/test_speedups.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/simplejson/tests/test_speedups.py b/simplejson/tests/test_speedups.py new file mode 100644 index 0000000..825ecf2 --- /dev/null +++ b/simplejson/tests/test_speedups.py @@ -0,0 +1,20 @@ +from unittest import TestCase + +from simplejson import encoder, scanner + +def has_speedups(): + return encoder.c_make_encoder is not None + +class TestDecode(TestCase): + def test_make_scanner(self): + if not has_speedups(): + return + self.assertRaises(AttributeError, scanner.c_make_scanner, 1) + + def test_make_encoder(self): + if not has_speedups(): + return + self.assertRaises(TypeError, encoder.c_make_encoder, + None, + "\xCD\x7D\x3D\x4E\x12\x4C\xF9\x79\xD7\x52\xBA\x82\xF2\x27\x4A\x7D\xA0\xCA\x75", + None) |
