File: test_issue221.py

package info (click to toggle)
python-orjson 3.11.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,116 kB
  • sloc: ansic: 11,268; python: 6,796; sh: 105; makefile: 9
file content (18 lines) | stat: -rw-r--r-- 318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# Copyright ijl (2022-2025), Aarni Koskela (2022)

import pytest

import orjson


@pytest.mark.parametrize(
    "val",
    [
        b'"\xc8\x93',
        b'"\xc8',
    ],
)
def test_invalid(val):
    with pytest.raises(orjson.JSONDecodeError):
        orjson.loads(val)