diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-08-03 22:14:57 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-08-03 22:14:57 +0200 |
commit | dce10fcff1de54121fb8b440b883ef5d3fe2f96a (patch) | |
tree | 072b4bd247e6f1cd95c08c7b67fea0fc96f0578e /_test/test_cyaml.py | |
parent | 2966a4f215861fa05e0dc7e0cd53350766e794c6 (diff) | |
download | ruamel.yaml-dce10fcff1de54121fb8b440b883ef5d3fe2f96a.tar.gz |
Apply oitnb and mypy 0.620, then make everything work again0.15.48
Diffstat (limited to '_test/test_cyaml.py')
-rw-r--r-- | _test/test_cyaml.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/_test/test_cyaml.py b/_test/test_cyaml.py index 4c5c5db..2d67509 100644 --- a/_test/test_cyaml.py +++ b/_test/test_cyaml.py @@ -4,18 +4,26 @@ import platform import pytest -@pytest.mark.skipif(platform.python_implementation() == 'Jython', - reason="Jython throws RepresenterError") +@pytest.mark.skipif( + platform.python_implementation() == 'Jython', reason='Jython throws RepresenterError' +) def test_load_cyaml(): import ruamel.yaml + assert ruamel.yaml.__with_libyaml__ from ruamel.yaml.cyaml import CLoader - ruamel.yaml.load("abc: 1", Loader=CLoader) + + ruamel.yaml.load('abc: 1', Loader=CLoader) def test_dump_cyaml(): import ruamel.yaml + data = {'a': 1, 'b': 2} - res = ruamel.yaml.dump(data, Dumper=ruamel.yaml.cyaml.CSafeDumper, - default_flow_style=False, allow_unicode=True) - assert res == "a: 1\nb: 2\n" + res = ruamel.yaml.dump( + data, + Dumper=ruamel.yaml.cyaml.CSafeDumper, + default_flow_style=False, + allow_unicode=True, + ) + assert res == 'a: 1\nb: 2\n' |