diff options
Diffstat (limited to 'tests/rules/test_indentation.py')
-rw-r--r-- | tests/rules/test_indentation.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/rules/test_indentation.py b/tests/rules/test_indentation.py index 1c6eddb..b08ada7 100644 --- a/tests/rules/test_indentation.py +++ b/tests/rules/test_indentation.py @@ -15,7 +15,7 @@ from tests.common import RuleTestCase -from yamllint.parser import token_or_comment_generator, Comment +from yamllint.parser import Comment, token_or_comment_generator from yamllint.rules.indentation import check @@ -50,8 +50,8 @@ class IndentationStackTestCase(RuleTestCase): .replace('Mapping', 'Map')) if token_type in ('StreamStart', 'StreamEnd'): continue - output += '{:>9} {}\n'.format(token_type, - self.format_stack(context['stack'])) + stack = self.format_stack(context['stack']) + output += f'{token_type:>9} {stack}\n' return output def test_simple_mapping(self): @@ -192,7 +192,7 @@ class IndentationStackTestCase(RuleTestCase): 'BMapStart B_MAP:0 KEY:0 VAL:2 B_SEQ:0 B_ENT:2 B_MAP:2\n' ' Key B_MAP:0 KEY:0 VAL:2 B_SEQ:0 B_ENT:2 B_MAP:2 KEY:2\n' ' Scalar B_MAP:0 KEY:0 VAL:2 B_SEQ:0 B_ENT:2 B_MAP:2 KEY:2\n' - ' Value B_MAP:0 KEY:0 VAL:2 B_SEQ:0 B_ENT:2 B_MAP:2 KEY:2 VAL:4\n' # noqa + ' Value B_MAP:0 KEY:0 VAL:2 B_SEQ:0 B_ENT:2 B_MAP:2 KEY:2 VAL:4\n' # noqa: E501 ' Scalar B_MAP:0 KEY:0 VAL:2 B_SEQ:0 B_ENT:2 B_MAP:2\n' ' BEnd B_MAP:0\n' # missing BEnd here |