Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I67c57d65accb3822f7f6a03fea96356fae9025b9
This commit is contained in:
jacky06 2019-03-06 22:22:12 +08:00 committed by Ghanshyam Mann
parent ad00e6d41b
commit 414bbf6d85
4 changed files with 26 additions and 17 deletions

View File

@ -587,15 +587,15 @@ class HtmlOutput(testtools.TestResult):
desc = doc and '%s: %s' % (name, doc) or name
row = TemplateData.REPORT_CLASS_TMPL % dict(
style=(ne > 0 and 'errorClass' or nf > 0
and 'failClass' or 'passClass'),
desc = desc,
count = np + nf + ne + ns,
Pass = np,
fail = nf,
error = ne,
skip = ns,
cid = 'c%s' % (cid + 1),
style=(ne > 0 and 'errorClass' or nf > 0 and
'failClass' or 'passClass'),
desc=desc,
count=np + nf + ne + ns,
Pass=np,
fail=nf,
error=ne,
skip=ns,
cid='c%s' % (cid + 1),
)
rows.append(row)
@ -677,8 +677,8 @@ class HtmlOutput(testtools.TestResult):
else:
doc = None
desc = doc and ('%s: %s' % (name, doc)) or name
tmpl = (has_output and TemplateData.REPORT_TEST_WITH_OUTPUT_TMPL
or TemplateData.REPORT_TEST_NO_OUTPUT_TMPL)
tmpl = (has_output and TemplateData.REPORT_TEST_WITH_OUTPUT_TMPL or
TemplateData.REPORT_TEST_NO_OUTPUT_TMPL)
script = TemplateData.REPORT_TEST_OUTPUT_TMPL % dict(
id=tid,

View File

@ -62,7 +62,9 @@ class TestCallers(base.TestCase):
return 'project.tests.foo' in args
with mock.patch.object(os_testr, 'exit', side_effect=_fake_exit), \
mock.patch.object(os_testr, 'get_parser', return_value=namespace), \
mock.patch.object(os_testr,
'get_parser',
return_value=namespace), \
mock.patch.object(os_testr,
'call_subunit_run',
side_effect=_fake_run):
@ -78,7 +80,9 @@ class TestCallers(base.TestCase):
return 'project.tests.foo' in args
with mock.patch.object(os_testr, 'exit', side_effect=_fake_exit), \
mock.patch.object(os_testr, 'get_parser', return_value=namespace), \
mock.patch.object(os_testr,
'get_parser',
return_value=namespace), \
mock.patch.object(os_testr,
'call_subunit_run',
side_effect=_fake_run):
@ -94,7 +98,9 @@ class TestCallers(base.TestCase):
return 'project.tests.foo' in args
with mock.patch.object(os_testr, 'exit', side_effect=_fake_exit), \
mock.patch.object(os_testr, 'get_parser', return_value=namespace), \
mock.patch.object(os_testr,
'get_parser',
return_value=namespace), \
mock.patch.object(os_testr,
'call_subunit_run',
side_effect=_fake_run):
@ -110,7 +116,9 @@ class TestCallers(base.TestCase):
return 'project.tests.foo' in args
with mock.patch.object(os_testr, 'exit', side_effect=_fake_exit), \
mock.patch.object(os_testr, 'get_parser', return_value=namespace), \
mock.patch.object(os_testr,
'get_parser',
return_value=namespace), \
mock.patch.object(os_testr,
'call_subunit_run',
side_effect=_fake_run):

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0

View File

@ -65,9 +65,10 @@ whitelist_externals = rm
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# E731 skipped as assign a lambda expression
# H405 skipped as it wrongly recognizes a multiline string as docstring
show-source = True
ignore = E123,E125,H405
ignore = E123,E125,E731,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build