mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
anchors: Fix invalid YAML in aliases test cases
Although accepted by PyYAML, `{*x: 4}` is not valid YAML: it should be
noted `{*x : 4}`. The reason is that a colon can be part of an anchor
name. See this comment from Tina Müller for more details:
https://github.com/adrienverge/yamllint/pull/550#discussion_r1155297373
Even if it's not a problem for yamllint, let's fix our tests to include
valid YAML snippets.
This commit is contained in:
@@ -142,7 +142,7 @@ class AnchorsTestCase(RuleTestCase):
|
||||
problem4=(12, 3),
|
||||
problem5=(13, 3),
|
||||
problem6=(24, 7),
|
||||
problem7=(27, 36))
|
||||
problem7=(27, 37))
|
||||
|
||||
def test_forbid_duplicated_anchors(self):
|
||||
conf = ('anchors:\n'
|
||||
|
||||
Reference in New Issue
Block a user