yamllint/tests
Adrien Vergé 8d543a4b9c key-duplicates: Fix failing test for missing space after colon
Commit c268a82 "key-duplicates: Don't crash on redundant closing
brackets or braces" fixed a problem but introduced another one: it
crashes on systems with (I guess) an old version of PyYAML. This is
probably linked to the "Allow colon in a plain scalar in a flow context"
issue on PyYAML [1].
For example, this problem happens on CentOS 8:

    FAIL: test_disabled (tests.rules.test_key_duplicates.KeyDuplicatesTestCase)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "…/tests/rules/test_key_duplicates.py", line 90, in test_disabled
        '{a:1, b:2}}\n', conf, problem=(2, 11, 'syntax'))
      File "…/tests/common.py", line 54, in check
        self.assertEqual(real_problems, expected_problems)
    AssertionError: Lists differ: …
    - [2:3: syntax error: found unexpected ':' (syntax)]
    + [2:11: <no description>]

I propose to simply fix the *space following a colon* problem, since
it's not related to what the original author @tamere-allo-peter tried to
fix.

[1]: https://github.com/yaml/pyyaml/pull/45
2022-07-08 18:05:21 +02:00
..
rules key-duplicates: Fix failing test for missing space after colon 2022-07-08 18:05:21 +02:00
yaml-1.2-spec-examples Tests: Remove ghost character from YAML spec example 2016-02-01 23:27:49 +01:00
__init__.py refactor: Remove UTF-8 headers in Python files 2022-06-09 09:40:06 +02:00
common.py tests: Increase test coverage 2022-06-09 10:03:08 +02:00
test_cli.py tests: Increase test coverage 2022-06-09 10:03:08 +02:00
test_config.py tests: Increase test coverage 2022-06-09 10:03:08 +02:00
test_linter.py tests: Increase test coverage 2022-06-09 10:03:08 +02:00
test_module.py refactor: Remove UTF-8 headers in Python files 2022-06-09 09:40:06 +02:00
test_parser.py refactor: Remove UTF-8 headers in Python files 2022-06-09 09:40:06 +02:00
test_spec_examples.py refactor: Remove UTF-8 headers in Python files 2022-06-09 09:40:06 +02:00
test_syntax_errors.py refactor: Remove UTF-8 headers in Python files 2022-06-09 09:40:06 +02:00
test_yamllint_directives.py refactor: Remove UTF-8 headers in Python files 2022-06-09 09:40:06 +02:00