diff options
Diffstat (limited to '_test')
| -rw-r--r-- | _test/roundtrip.py | 6 | ||||
| -rw-r--r-- | _test/test_issues.py | 19 |
2 files changed, 16 insertions, 9 deletions
diff --git a/_test/roundtrip.py b/_test/roundtrip.py index 090b9e0..af8a555 100644 --- a/_test/roundtrip.py +++ b/_test/roundtrip.py @@ -169,6 +169,7 @@ def na_round_trip( inp: input string to parse outp: expected output (equals input if not specified) """ + inp = dedent(inp) if outp is None: outp = inp if version is not None: @@ -194,10 +195,7 @@ def na_round_trip( yaml.explicit_start = explicit_start yaml.explicit_end = explicit_end res = yaml.dump(data, compare=doutp) - #if res != doutp: - # diff(doutp, res, 'input string') - #print('\nroundtrip data:\n', res, sep="") - #assert res == doutp + return res def YAML(**kw): diff --git a/_test/test_issues.py b/_test/test_issues.py index 9b301a9..5606122 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -853,11 +853,20 @@ class TestIssues: def test_issue_304(self): inp = """ - %YAML 1.2 - %TAG ! tag:example.com,2019: - --- - !foo null - ... + %YAML 1.2 + %TAG ! tag:example.com,2019: + --- + !foo null + ... + """ + d = na_round_trip(inp) # NOQA + + def test_issue_305(self): + inp = """ + %YAML 1.2 + --- + !<tag:example.com,2019/path#foo> null + ... """ d = na_round_trip(inp) # NOQA |
