summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-13 11:15:32 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-13 11:15:32 +0200
commitc6c7a98673690f6c46c80c88ba2909b7721fd40a (patch)
tree678b61ea38d89e4c5f9165586366fbce9a4bedde /_test
parentb49a56399b1086eabf0abb9d86297188db108c19 (diff)
downloadruamel.yaml-c6c7a98673690f6c46c80c88ba2909b7721fd40a.tar.gz
fix issue 102 now also for empty mappings with comments0.15.54
*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')
-rw-r--r--_test/test_comments.py2
-rw-r--r--_test/test_issues.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/_test/test_comments.py b/_test/test_comments.py
index bb08f7e..a5e4ee0 100644
--- a/_test/test_comments.py
+++ b/_test/test_comments.py
@@ -59,7 +59,7 @@ class TestComments:
# comment
scalar
...
- """, "scalar\n...\n")
+ """, 'scalar\n...\n')
def test_main_mapping_begin_end(self):
round_trip("""
diff --git a/_test/test_issues.py b/_test/test_issues.py
index fb11322..d2ea460 100644
--- a/_test/test_issues.py
+++ b/_test/test_issues.py
@@ -34,7 +34,7 @@ class TestIssues:
var4: {a: 1} #filled object
var5: [] #empty array
""")
- x = round_trip(s, preserve_quotes=True) # NOQA
+ x = round_trip(yaml_str, preserve_quotes=True) # NOQA
def test_issue_160(self):
s = dedent("""\
@@ -85,7 +85,5 @@ class TestIssues:
json_str2 = '{"abc":[{"a":"1", "uses":0}]}'
def test_issue_172(self):
- x = round_trip_load(TestIssues.json_str2)
- x = round_trip_load(TestIssues.json_str)
-
-
+ x = round_trip_load(TestIssues.json_str2) # NOQA
+ x = round_trip_load(TestIssues.json_str) # NOQA