summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-29 13:01:41 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-29 13:01:41 +0200
commit46589f9d94ef95b851f4cb56b06eeb11753db25e (patch)
treeb1e415e8ed97f9faa5f9d146a40dbb4ccfe954cf /_test
parent33f0d0b44b6272a572cc14494ea788c867ae190f (diff)
downloadruamel.yaml-46589f9d94ef95b851f4cb56b06eeb11753db25e.tar.gz
allow version 1.2 using C loader/dumper0.15.62
This just allows to use version 1.2 instead of 1.1 fixed. There is no actual parsing/dumping code changed. So documents with YAML 1.2 specific features (e.g. octals) are likely to fail. *When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to '_test')
-rw-r--r--_test/test_cyaml.py9
-rw-r--r--_test/test_spec_examples.py14
2 files changed, 9 insertions, 14 deletions
diff --git a/_test/test_cyaml.py b/_test/test_cyaml.py
index f6b54d5..5ac6f31 100644
--- a/_test/test_cyaml.py
+++ b/_test/test_cyaml.py
@@ -29,7 +29,7 @@ def test_dump_cyaml():
)
assert res == 'a: 1\nb: 2\n'
-@pytest.mark.xfail(strict=True)
+
def test_load_cyaml_1_2():
# issue 155
import ruamel.yaml
@@ -43,18 +43,13 @@ def test_load_cyaml_1_2():
yaml = ruamel.yaml.YAML(typ='safe')
yaml.load(inp)
-@pytest.mark.xfail(strict=True)
+
def test_dump_cyaml_1_2():
# issue 155
import ruamel.yaml
from ruamel.yaml.compat import StringIO
assert ruamel.yaml.__with_libyaml__
- inp = dedent("""\
- %YAML 1.2
- ---
- num_epochs: 70000
- """)
yaml = ruamel.yaml.YAML(typ='safe')
yaml.version = (1, 2)
yaml.default_flow_style = False
diff --git a/_test/test_spec_examples.py b/_test/test_spec_examples.py
index 6661698..ba38585 100644
--- a/_test/test_spec_examples.py
+++ b/_test/test_spec_examples.py
@@ -87,7 +87,7 @@ def test_example_2_7():
- Mark McGwire
- Sammy Sosa
- Ken Griffey
-
+
# Team ranking
---
- Chicago Cubs
@@ -154,7 +154,7 @@ def test_example_2_11():
- Chicago cubs
:
- 2001-07-23
-
+
? [ New York Yankees,
Atlanta Braves ]
: [ 2001-07-02, 2001-08-12,
@@ -193,7 +193,7 @@ def test_example_2_13():
def test_example_2_14():
yaml = YAML()
yaml.explicit_start = True
- yam.indent(root_scalar=2) # needs to be added
+ yaml.indent(root_scalar=2) # needs to be added
yaml.round_trip("""
--- >
Mark McGwire's
@@ -209,10 +209,10 @@ def test_example_2_15():
>
Sammy Sosa completed another
fine season with great stats.
-
+
63 Home Runs
0.288 Batting Average
-
+
What a year!
""")
@@ -241,7 +241,7 @@ def test_example_2_17():
unicode: "Sosa did fine.\u263A"
control: "\b1998\t1999\t2000\n"
hex esc: "\x0d\x0a is \r\n"
-
+
single: '"Howdy!" he cried.'
quoted: ' # Not a ''comment''.'
tie-fighter: '|\-*-/|'
@@ -255,7 +255,7 @@ def test_example_2_18():
plain:
This unquoted scalar
spans many lines.
-
+
quoted: "So does this
quoted scalar.\n"
""")