summaryrefslogtreecommitdiff
path: root/_test/test_issues.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2019-08-08 08:21:57 +0200
committerAnthon van der Neut <anthon@mnt.org>2019-08-08 08:21:57 +0200
commit679917903a98206aa3566594c89b2ce20705b2c6 (patch)
tree35c057be6cc83ba8aa417c748a3e52a04b5b7688 /_test/test_issues.py
parentdcf61a365571b2ace182232252db6122382e9ace (diff)
downloadruamel.yaml-679917903a98206aa3566594c89b2ce20705b2c6.tar.gz
allow '#' in tag URI, force use of new clib0.16.1
fixes issue #300 *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/test_issues.py')
-rw-r--r--_test/test_issues.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/_test/test_issues.py b/_test/test_issues.py
index 90128dd..3692f61 100644
--- a/_test/test_issues.py
+++ b/_test/test_issues.py
@@ -824,6 +824,32 @@ class TestIssues:
dc = copy.deepcopy(data)
assert round_trip_dump(dc) == inp
+ def test_issue_300(self):
+ from ruamel.yaml import YAML
+
+ inp = dedent("""
+ %YAML 1.2
+ %TAG ! tag:example.com,2019/path#fragment
+ ---
+ null
+ """)
+ YAML().load(inp)
+
+ def test_issue_300a(self):
+ import ruamel.yaml
+
+ inp = dedent("""
+ %YAML 1.1
+ %TAG ! tag:example.com,2019/path#fragment
+ ---
+ null
+ """)
+ yaml = YAML()
+ yaml.version = (1, 1) # This should not be necessary -> issue 301
+ with pytest.raises(ruamel.yaml.scanner.ScannerError,
+ match='while scanning a directive'):
+ yaml.load(inp)
+
# @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError)
# def test_issue_ xxx(self):
# inp = """