Module: check_mk
Branch: master
Commit: 2bc1861ffd8f95a8dbd89cf9c394b84eebb1069d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2bc1861ffd8f95…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Mar 6 12:23:06 2019 +0100
regression tests: disable yapf III
Change-Id: I4cc96d2179b6a623ee8bde220df7de68c71abf07
---
tests/unit/checks/generictests/regression.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/unit/checks/generictests/regression.py
b/tests/unit/checks/generictests/regression.py
index 9dafc2e..5d05853 100644
--- a/tests/unit/checks/generictests/regression.py
+++ b/tests/unit/checks/generictests/regression.py
@@ -46,7 +46,7 @@ import generictests.run
class WritableDataset(object):
def __init__(self, filename, init_dict):
- self.comments = ['yapf: disable', '']
+ self.comments = ['yapf: disable']
self.filename = filename
self.writelist = (
'checkname',
@@ -77,7 +77,8 @@ class WritableDataset(object):
v_str = pprint.pformat(v).replace('\n', '\n' + ' ' *
len(k_str))
content += ['', '', k_str + v_str]
with open(self.filename, 'w') as f:
- f.write('\n# '.join(self.comments))
+ for comment in self.comments:
+ f.write('# %s\n' % comment)
f.write('\n'.join(content))