From 9fc8c7735c8ddae50c583261d9ac25efe52474a0 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Wed, 18 Jul 2018 14:49:07 +0200 Subject: [PATCH] test_includehandler: Fix indention pylint reports tests/test_includehandler.py:343:0: C0330: Wrong hanging indentation before block (add 4 spaces). 'x.yml': header.format(''' includes: ["y.yml", "z.yml"] ^ | (bad-continuation) tests/test_includehandler.py:345:0: C0330: Wrong hanging indentation before block (add 4 spaces). os.path.abspath('y.yml'): header.format(''' includes: ["z.yml"] ^ | (bad-continuation) tests/test_includehandler.py:347:0: C0330: Wrong hanging indentation before block (add 4 spaces). os.path.abspath('z.yml'): header.format(''' ^ | (bad-continuation) Signed-off-by: Daniel Wagner --- tests/test_includehandler.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_includehandler.py b/tests/test_includehandler.py index ed1fe31..82c61e4 100644 --- a/tests/test_includehandler.py +++ b/tests/test_includehandler.py @@ -339,13 +339,15 @@ v3: # disable schema validation for this test: monkeypatch.setattr(includehandler, 'CONFIGSCHEMA', {}) header = self.__class__.header - with patch_open(includehandler, dictionary={ - 'x.yml': header.format(''' includes: ["y.yml", "z.yml"] + data = {'x.yml': + header.format(''' includes: ["y.yml", "z.yml"] v: {v1: x, v2: x}'''), - os.path.abspath('y.yml'): header.format(''' includes: ["z.yml"] + os.path.abspath('y.yml'): + header.format(''' includes: ["z.yml"] v: {v2: y, v3: y, v5: y}'''), - os.path.abspath('z.yml'): header.format(''' -v: {v3: z, v4: z}''')}): + os.path.abspath('z.yml'): header.format(''' +v: {v3: z, v4: z}''')} + with patch_open(includehandler, dictionary=data): ginc = includehandler.GlobalIncludes('x.yml') config, _ = ginc.get_config() keys = list(config['v'].keys())