Coverage for jsonurl_unicode_test.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v6.5.0, created at 2022-11-20 21:12 +0000

1import pytest 

2 

3import jsonurl_py as jsonurl 

4 

5# From https://www.kermitproject.org/utf8.html 

6lines = [ 

7 "我能吞下玻璃而不伤身体", 

8 "أنا قادر على أكل الزجاج و هذا لا يؤلمني", 

9 "Я могу есть стекло, оно мне не вредит", 

10] 

11 

12 

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