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_tag.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_tag.py')
-rw-r--r-- | _test/test_tag.py | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/_test/test_tag.py b/_test/test_tag.py index c4fabc0..824a0c3 100644 --- a/_test/test_tag.py +++ b/_test/test_tag.py @@ -1,6 +1,6 @@ # coding: utf-8 -import pytest # NOQA +import pytest # NOQA from roundtrip import round_trip, round_trip_load @@ -25,92 +25,112 @@ def register_xxx(**kw): class TestIndentFailures: def test_tag(self): - round_trip("""\ + round_trip( + """\ !!python/object:__main__.Developer name: Anthon location: Germany language: python - """) + """ + ) def test_full_tag(self): - round_trip("""\ + round_trip( + """\ !!tag:yaml.org,2002:python/object:__main__.Developer name: Anthon location: Germany language: python - """) + """ + ) def test_standard_tag(self): - round_trip("""\ + round_trip( + """\ !!tag:yaml.org,2002:python/object:map name: Anthon location: Germany language: python - """) + """ + ) def test_Y1(self): - round_trip("""\ + round_trip( + """\ !yyy name: Anthon location: Germany language: python - """) + """ + ) def test_Y2(self): - round_trip("""\ + round_trip( + """\ !!yyy name: Anthon location: Germany language: python - """) + """ + ) class TestRoundTripCustom: def test_X1(self): register_xxx() - round_trip("""\ + round_trip( + """\ !xxx name: Anthon location: Germany language: python - """) + """ + ) @pytest.mark.xfail(strict=True) def test_X_pre_tag_comment(self): register_xxx() - round_trip("""\ + round_trip( + """\ - # hello !xxx name: Anthon location: Germany language: python - """) + """ + ) @pytest.mark.xfail(strict=True) def test_X_post_tag_comment(self): register_xxx() - round_trip("""\ + round_trip( + """\ - !xxx # hello name: Anthon location: Germany language: python - """) + """ + ) def test_scalar_00(self): # https://stackoverflow.com/a/45967047/1307905 - round_trip("""\ + round_trip( + """\ Outputs: Vpc: Value: !Ref: vpc # first tag Export: Name: !Sub "${AWS::StackName}-Vpc" # second tag - """) + """ + ) class TestIssue201: def test_encoded_unicode_tag(self): - round_trip_load(""" + round_trip_load( + """ s: !!python/%75nicode 'abc' - """) + """ + ) |