File: test_pulling.py

package info (click to toggle)
python-ijson 3.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 696 kB
  • sloc: python: 2,816; ansic: 1,776; sh: 4; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest

from .test_base import JSON, JSON_EVENTS


@pytest.mark.pull_only
def test_string_stream(adaptor):
    with pytest.deprecated_call():
        events = adaptor.basic_parse(JSON.decode('utf-8'))
    assert JSON_EVENTS == events


@pytest.mark.pull_only
@pytest.mark.parametrize("buf_size", (2 ** exp for exp in range(0, 13, 2)))
def test_different_buf_sizes(adaptor, buf_size):
    assert JSON_EVENTS == adaptor.basic_parse(JSON, buf_size=buf_size)