Fix E122,E126,E128 items in codebase
In the land of random cleanups, let more of the whitespace rules back in. Also explicitly exclude E125 because of the overreach, and leave E123 excluded because it creates some kind of odd artifacts in the current code (possibly clean it up later). Tox.ini adjusted with comments about the fact that what we are ignoring is there for a reason. Change-Id: I5636cb646d7898df71b715aa0e32a68ce279ee80
This commit is contained in:
@@ -42,8 +42,9 @@ class TestQueries(tests.TestCase):
|
||||
for x in self.classifier.queries:
|
||||
print("Looking for bug: https://bugs.launchpad.net/bugs/%s"
|
||||
% x['bug'])
|
||||
self.assertTrue((self._is_valid_ElasticSearch_query(x) or
|
||||
self._is_valid_launchpad_bug(x['bug'])),
|
||||
self.assertTrue(
|
||||
(self._is_valid_ElasticSearch_query(x) or
|
||||
self._is_valid_launchpad_bug(x['bug'])),
|
||||
("Something is wrong with bug %s" % x['bug']))
|
||||
|
||||
def _is_valid_ElasticSearch_query(self, x):
|
||||
|
||||
@@ -77,16 +77,22 @@ class TestClassifier(tests.TestCase):
|
||||
|
||||
def test_is_ready(self):
|
||||
self.stubs.Set(self.classifier.es, 'search', _fake_search)
|
||||
result = self.classifier._is_ready('49282', '3', 'BLAH http://logs.'
|
||||
'openstack.org/57/51057/1/gate/gate-tempest-devstack-vm-full'
|
||||
'/f8965ee')
|
||||
result = self.classifier._is_ready(
|
||||
'49282',
|
||||
'3',
|
||||
'BLAH http://logs.openstack.org/57/51057/1/gate/'
|
||||
'gate-tempest-devstack-vm-full/f8965ee'
|
||||
)
|
||||
self.assertTrue(result)
|
||||
|
||||
def test_classify(self):
|
||||
self.stubs.Set(self.classifier.es, 'search', _fake_search)
|
||||
self.stubs.Set(self.classifier, '_urls_match', _fake_urls_match)
|
||||
self.stubs.Set(self.classifier, '_is_ready', _fake_is_ready)
|
||||
bug_numbers = self.classifier.classify('47463', '3',
|
||||
bug_numbers = self.classifier.classify(
|
||||
'47463',
|
||||
'3',
|
||||
' blah http://logs.openstack.org/63/47463/3/gate/gate-tempest'
|
||||
'-devstack-vm-postgres-full/99bb8f6')
|
||||
'-devstack-vm-postgres-full/99bb8f6'
|
||||
)
|
||||
self.assertEqual(bug_numbers, [1234567])
|
||||
|
||||
Reference in New Issue
Block a user