Allow logging in tempest tests
Hacking rule C309 is meant to prevent adding logging to unit tests, but it is also preventing logging in tempest in-tree tests, which should be allowed. This patch modifies method C309 check to allow logging in cinder/tests/tempest TrivialFix Change-Id: Id0808bff83ceda5dd0a6525a99c84e2f60165526
This commit is contained in:
parent
faf610f766
commit
116aaa79b9
@ -440,7 +440,8 @@ def check_timeutils_isotime(logical_line):
|
||||
|
||||
|
||||
def no_test_log(logical_line, filename, noqa):
|
||||
if "cinder/tests" not in filename or noqa:
|
||||
if ('cinder/tests/tempest' in filename or
|
||||
'cinder/tests' not in filename or noqa):
|
||||
return
|
||||
msg = "C309: Unit tests should not perform logging."
|
||||
if logging_instance.match(logical_line):
|
||||
|
Loading…
x
Reference in New Issue
Block a user