PATH:
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
simplejson
/
tests
from unittest import TestCase import simplejson from simplejson.compat import text_type # Tests for issue demonstrated in https://github.com/simplejson/simplejson/issues/144 class WonkyTextSubclass(text_type): def __getslice__(self, start, end): return self.__class__('not what you wanted!') class TestStrSubclass(TestCase): def test_dump_load(self): for s in ['', '"hello"', 'text', u'\u005c']: self.assertEqual( s, simplejson.loads(simplejson.dumps(WonkyTextSubclass(s)))) self.assertEqual( s, simplejson.loads(simplejson.dumps(WonkyTextSubclass(s), ensure_ascii=False)))
[-] test_separators.py
[edit]
[-] test_speedups.py
[edit]
[-] test_namedtuple.py
[edit]
[-] test_indent.py
[edit]
[-] test_check_circular.py
[edit]
[-] test_decode.py
[edit]
[-] test_dump.py
[edit]
[-] test_raw_json.py
[edit]
[+]
..
[-] _cibw_runner.py
[edit]
[-] test_unicode.py
[edit]
[-] test_float.py
[edit]
[-] test_errors.py
[edit]
[-] test_encode_basestring_ascii.py
[edit]
[-] test_subclass.py
[edit]
[-] test_decimal.py
[edit]
[-] test_encode_for_html.py
[edit]
[-] test_default.py
[edit]
[-] test_iterable.py
[edit]
[-] test_fail.py
[edit]
[-] test_bitsize_int_as_string.py
[edit]
[-] test_tool.py
[edit]
[+]
__pycache__
[-] test_bigint_as_string.py
[edit]
[-] test_for_json.py
[edit]
[-] test_pass3.py
[edit]
[-] test_pass2.py
[edit]
[-] test_item_sort_key.py
[edit]
[-] __init__.py
[edit]
[-] test_str_subclass.py
[edit]
[-] test_scanstring.py
[edit]
[-] test_recursion.py
[edit]
[-] test_tuple.py
[edit]
[-] test_pass1.py
[edit]