blob: dfb6c4cd89f816bbef3c2ae866074a6033a2e3d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# coding: utf-8
import pytest # type: ignore # NOQA
from roundtrip import round_trip_load, round_trip_dump # type: ignore
class TestNone:
def test_dump00(self) -> None:
data = None
s = round_trip_dump(data)
assert s == 'null\n...\n'
d = round_trip_load(s)
assert d == data
def test_dump01(self) -> None:
data = None
s = round_trip_dump(data, explicit_end=True)
assert s == 'null\n...\n'
d = round_trip_load(s)
assert d == data
def test_dump02(self) -> None:
data = None
s = round_trip_dump(data, explicit_end=False)
assert s == 'null\n...\n'
d = round_trip_load(s)
assert d == data
def test_dump03(self) -> None:
data = None
s = round_trip_dump(data, explicit_start=True)
assert s == '---\n...\n'
d = round_trip_load(s)
assert d == data
def test_dump04(self) -> None:
data = None
s = round_trip_dump(data, explicit_start=True, explicit_end=False)
assert s == '---\n...\n'
d = round_trip_load(s)
assert d == data
|