summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-08-14 22:26:01 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-08-14 22:26:01 +0200
commitcddd031430973470cefd7412c76bd633233569bb (patch)
treeee451fffd663a6c60b9154657143d01fe82cc505 /_test
parent82451b513ea33cce3f228216d5b99b8c046cf182 (diff)
downloadruamel.yaml-cddd031430973470cefd7412c76bd633233569bb.tar.gz
fix for '{"in":{},"out":{}}' no longer parsing, reported by mjalkio on so0.15.30
Diffstat (limited to '_test')
-rw-r--r--_test/test_indentation.py3
-rw-r--r--_test/test_version.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/_test/test_indentation.py b/_test/test_indentation.py
index 4e991fd..014f89b 100644
--- a/_test/test_indentation.py
+++ b/_test/test_indentation.py
@@ -298,8 +298,7 @@ class TestSeparateMapSeqIndents:
def test_issue_51(self):
yaml = YAML()
# yaml.map_indent = 2 # the default
- yaml.sequence_indent = 4
- yaml.sequence_dash_offset = 2
+ yaml.indent(sequence=4, offset=2)
yaml.preserve_quotes = True
yaml.round_trip("""
role::startup::author::rsyslog_inputs:
diff --git a/_test/test_version.py b/_test/test_version.py
index 795c242..0c270d7 100644
--- a/_test/test_version.py
+++ b/_test/test_version.py
@@ -3,7 +3,7 @@
import pytest # NOQA
import ruamel.yaml
-from roundtrip import dedent, round_trip
+from roundtrip import dedent, round_trip, round_trip_load
def load(s, version=None):
@@ -149,3 +149,7 @@ class TestIssue62:
round_trip(s.format(''), preserve_quotes=True)
# note the flow seq on the --- line!
round_trip(s.format('%YAML 1.2\n--- '), preserve_quotes=True, version="1.2")
+
+ def test_so_45681626(self):
+ # was not properly parsing
+ round_trip_load('{"in":{},"out":{}}')