summaryrefslogtreecommitdiff
path: root/_test/test_indentation.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-07-28 23:53:41 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-07-28 23:53:41 +0200
commitf9b50b606fe3f12b09dd36cb999238bf440d0cd1 (patch)
tree04a14e70240d7677ac84d95cd38f3cded4729091 /_test/test_indentation.py
parent9f9266b31445296439cbcc9c0e3f01b4fb15ed8a (diff)
downloadruamel.yaml-f9b50b606fe3f12b09dd36cb999238bf440d0cd1.tar.gz
Resolving issue #210 deprecation warning in python 3.7
*When this change indeed resolves your problem, please **Close** this issue*. *(You can do so usingthe WorkFlow pull-down (close to the top right of this page)*
Diffstat (limited to '_test/test_indentation.py')
-rw-r--r--_test/test_indentation.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/_test/test_indentation.py b/_test/test_indentation.py
index 014f89b..528e3b6 100644
--- a/_test/test_indentation.py
+++ b/_test/test_indentation.py
@@ -7,13 +7,11 @@ from __future__ import unicode_literals
import pytest # NOQA
-import ruamel.yaml
-from ruamel.yaml.util import load_yaml_guess_indent
-
from roundtrip import round_trip, round_trip_load, round_trip_dump, dedent, YAML
def rt(s):
+ import ruamel.yaml
return ruamel.yaml.dump(
ruamel.yaml.load(s, Loader=ruamel.yaml.RoundTripLoader),
Dumper=ruamel.yaml.RoundTripDumper,
@@ -55,6 +53,7 @@ class TestIndent:
# first test by explicitly setting flow style
def test_added_inline_list(self):
+ import ruamel.yaml
s1 = dedent("""
a:
- b
@@ -72,6 +71,7 @@ class TestIndent:
# ############ flow mappings
def test_roundtrip_flow_mapping(self):
+ import ruamel.yaml
s = dedent("""\
- {a: 1, b: hallo}
- {j: fka, k: 42}
@@ -209,6 +209,7 @@ class TestYpkgIndent:
def guess(s):
+ from ruamel.yaml.util import load_yaml_guess_indent
x, y, z = load_yaml_guess_indent(dedent(s))
return y, z