summaryrefslogtreecommitdiff
path: root/_test/test_none.py
diff options
context:
space:
mode:
Diffstat (limited to '_test/test_none.py')
-rw-r--r--_test/test_none.py32
1 files changed, 11 insertions, 21 deletions
diff --git a/_test/test_none.py b/_test/test_none.py
index e313edc..42aef4c 100644
--- a/_test/test_none.py
+++ b/_test/test_none.py
@@ -1,51 +1,41 @@
# coding: utf-8
-
import pytest # NOQA
+from roundtrip import round_trip_load, round_trip_dump
class TestNone:
def test_dump00(self):
- import ruamel.yaml # NOQA
-
data = None
- s = ruamel.yaml.round_trip_dump(data)
+ s = round_trip_dump(data)
assert s == 'null\n...\n'
- d = ruamel.yaml.round_trip_load(s)
+ d = round_trip_load(s)
assert d == data
def test_dump01(self):
- import ruamel.yaml # NOQA
-
data = None
- s = ruamel.yaml.round_trip_dump(data, explicit_end=True)
+ s = round_trip_dump(data, explicit_end=True)
assert s == 'null\n...\n'
- d = ruamel.yaml.round_trip_load(s)
+ d = round_trip_load(s)
assert d == data
def test_dump02(self):
- import ruamel.yaml # NOQA
-
data = None
- s = ruamel.yaml.round_trip_dump(data, explicit_end=False)
+ s = round_trip_dump(data, explicit_end=False)
assert s == 'null\n...\n'
- d = ruamel.yaml.round_trip_load(s)
+ d = round_trip_load(s)
assert d == data
def test_dump03(self):
- import ruamel.yaml # NOQA
-
data = None
- s = ruamel.yaml.round_trip_dump(data, explicit_start=True)
+ s = round_trip_dump(data, explicit_start=True)
assert s == '---\n...\n'
- d = ruamel.yaml.round_trip_load(s)
+ d = round_trip_load(s)
assert d == data
def test_dump04(self):
- import ruamel.yaml # NOQA
-
data = None
- s = ruamel.yaml.round_trip_dump(data, explicit_start=True, explicit_end=False)
+ s = round_trip_dump(data, explicit_start=True, explicit_end=False)
assert s == '---\n...\n'
- d = ruamel.yaml.round_trip_load(s)
+ d = round_trip_load(s)
assert d == data