def no_assert_equal_true_false(logical_line):
 _start_re = re.compile('assert(Not)?Equal\\((True|False),')
 _end_re = re.compile('assert(Not)?Equal\\(.*,\\s+(True|False)\\)$')
 if (_start_re.search(logical_line) or _end_re.search(logical_line)):
  (yield (0, 'N355: assertEqual(A, True|False), assertEqual(True|False, A), assertNotEqual(A, True|False), or assertEqual(True|False, A) sentences must not be used. Use assertTrue(A) or assertFalse(A) instead'))

def no_assert_equal_true_false ( logical_line ) : _start_re = re . compile ( 'assert(Not)?Equal\\((True|False),' ) _end_re = re . compile ( 'assert(Not)?Equal\\(.*,\\s+(True|False)\\)$' ) if ( _start_re . search ( logical_line ) or _end_re . search ( logical_line ) ) : ( yield ( 0 , 'N355: assertEqual(A, True|False), assertEqual(True|False, A), assertNotEqual(A, True|False), or assertEqual(True|False, A) sentences must not be used. Use assertTrue(A) or assertFalse(A) instead' ) )
enforce use of asserttrue/assertfalse .