a  ze@sfddlmZddlmZmZddlmZgdZGdddZGdddeeZ Gd d d eeZ d S) ) OrderedDict)PyTestCTest)bigaddrspacetest) )u9/\"쫾몾ꮘﳞ볚 `1~!@#$%^&*()_+-=[]{}|;:',./<>?zT"/\\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"uģ䕧覫췯ꯍz&"\u0123\u4567\u89ab\ucdef\uabcd\uef4a")Zcontrolsz "controls"z z "\b\f\n\r\t")z1{"object with 1 member":["array with 1 element"]}z7"{\"object with 1 member\":[\"array with 1 element\"]}")z s p a c e d z" s p a c e d ")u𝄠z"\ud834\udd20")uαΩz"\u03b1\u03a9")z`1~!@#$%^&*()_+-={':[,]}|;.?z!"`1~!@#$%^&*()_+-={':[,]}|;.?"rrc@s$eZdZddZddZddZdS)TestEncodeBasestringAsciic CsF|jjjj}tD]0\}}|jj|}|||d||||qdS)Nz{0!r} != {1!r} for {2}({3!r}))jsonencoderencode_basestring_ascii__name__CASES assertEqualformat)selfZfnameZ input_stringexpectresultr_/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_json/test_encode_basestring_ascii.pytest_encode_basestring_asciis  z6TestEncodeBasestringAscii.test_encode_basestring_asciicCs&gd}|t|}||ddS)N)Zone)Ztwo)Zthree)Zfour)Zfivez6{"one": 1, "two": 2, "three": 3, "four": 4, "five": 5})dumpsrrritemssrrrtest_ordered_dictsz+TestEncodeBasestringAscii.test_ordered_dictcCs*gd}|jt|dd}||ddS)NrT)Z sort_keysz6{"five": 5, "four": 4, "one": 1, "three": 3, "two": 2})rdictrrrrrtest_sorted_dict#sz*TestEncodeBasestringAscii.test_sorted_dictN)r __module__ __qualname__rr r"rrrrrsrc@s eZdZdS)TestPyEncodeBasestringAsciiN)r r#r$rrrrr%)r%c@seZdZeddZdS)TestCEncodeBasestringAsciicCsHd}d|}|t|jj|Wdn1s:0YdS)Ni*)Z assertRaises OverflowErrorr r r )rsizerrrr test_overflow+s z(TestCEncodeBasestringAscii.test_overflowN)r r#r$rr+rrrrr'*sr'N) collectionsrZtest.test_jsonrrZ test.supportrr rr%r'rrrrs