remove V318 hacking

already implemented in infra hacking H203

Change-Id: Ibb3b1c94230bb39d4eeac46242b3206aad1a81d9
This commit is contained in:
Eyal 2018-01-14 10:10:19 +02:00
parent 042858d98a
commit 060bdfdc10
2 changed files with 0 additions and 23 deletions

View File

@ -56,18 +56,6 @@ def assert_equal_type(logical_line):
yield (0, "V317: assertEqual(type(A), B) sentences not allowed") yield (0, "V317: assertEqual(type(A), B) sentences not allowed")
def assert_equal_none(logical_line):
"""Check for assertEqual(A, None) or assertEqual(None, A) sentences
V318
"""
res = (asse_equal_start_with_none_re.match(logical_line) or
asse_equal_end_with_none_re.match(logical_line))
if res:
yield (0, "V318: assertEqual(A, None) or assertEqual(None, A) "
"sentences not allowed")
def no_translate_logs(logical_line): def no_translate_logs(logical_line):
"""Check for use of LOG.*(_( """Check for use of LOG.*(_(
@ -168,7 +156,6 @@ def factory(register):
register(assert_true_instance) register(assert_true_instance)
register(check_assert_true_false) register(check_assert_true_false)
register(assert_equal_type) register(assert_equal_type)
register(assert_equal_none)
register(no_translate_logs) register(no_translate_logs)
register(no_direct_use_of_unicode_function) register(no_direct_use_of_unicode_function)
register(no_mutable_default_args) register(no_mutable_default_args)

View File

@ -35,16 +35,6 @@ class HackingTestCase(base.BaseTest):
self.assertEqual( self.assertEqual(
0, len(list(checks.assert_equal_type("self.assertTrue()")))) 0, len(list(checks.assert_equal_type("self.assertTrue()"))))
def test_assert_equal_none(self):
self.assertEqual(1, len(list(checks.assert_equal_none(
"self.assertEqual(A, None)"))))
self.assertEqual(1, len(list(checks.assert_equal_none(
"self.assertEqual(None, A)"))))
self.assertEqual(
0, len(list(checks.assert_equal_none("self.assertIsNone()"))))
def test_no_translate_logs(self): def test_no_translate_logs(self):
for log in checks._all_log_levels: for log in checks._all_log_levels:
bad = 'LOG.%s(_("Bad"))' % log bad = 'LOG.%s(_("Bad"))' % log