Coverage for jsonurl_unicode_test.py: 100%
9 statements
« prev ^ index » next coverage.py v7.6.8, created at 2024-12-06 11:15 +0000
« prev ^ index » next coverage.py v7.6.8, created at 2024-12-06 11:15 +0000
1import pytest
3import jsonurl_py as jsonurl
5# From https://www.kermitproject.org/utf8.html
6lines = [
7 "我能吞下玻璃而不伤身体",
8 "أنا قادر على أكل الزجاج و هذا لا يؤلمني",
9 "Я могу есть стекло, оно мне не вредит",
10]
13@pytest.mark.parametrize("index", range(len(lines)))
14def test(index: int):
15 text = lines[index]
16 dump = jsonurl.dumps(text)
17 text_load = jsonurl.loads(dump)
18 assert text_load == text