Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
simplejson
/
tests
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/simplejson/tests/test_recursion.pyc
mς #Ic @ s\ d k l Z d k Z d f d YZ d e i f d YZ d e f d YZ d S( ( s TestCaseNt JSONTestObjectc B s t Z RS( N( t __name__t __module__( ( ( tC /usr/lib/python2.4/site-packages/simplejson/tests/test_recursion.pyR s t RecursiveJSONEncoderc B s t Z e Z d Z RS( Nc C s: | t j o | i o t g Sq* d Sn t i i | S( NR ( t oR t selft recurset jsont JSONEncodert default( R R ( ( R R s ( R R t FalseR R ( ( ( R R s t TestRecursionc B s# t Z d Z d Z d Z RS( Nc C sΊ g } | i | y t i | Wn t j o n X| i d g } | g } | i | y t i | Wn t j o n X| i d g } | | g } t i | d S( Ns) didn't raise ValueError on list recursions5 didn't raise ValueError on alternating list recursion( t xt appendR t dumpst ValueErrorR t failt y( R R R ( ( R t test_listrecursion s$ c C ss h } | | d <y t i | Wn t j o n X| i d h } h d | <d | <} t i | d S( Nt tests) didn't raise ValueError on dict recursiont at b( R R R R R R R ( R R R ( ( R t test_dictrecursion, s c C sc t } | i | i t d t | _ y | i t Wn t j o n X| i d d S( Ns "JSONTestObject"s, didn't raise ValueError on default recursion( R t encR t assertEqualst encodeR t TrueR R R ( R R ( ( R t test_defaultrecursion: s ( R R R R R ( ( ( R R s ( t unittestt TestCaset simplejsonR R R R R ( R R R R R ( ( R t ? s