@core.flake8ext
@core.off_by_default
def check_unittest_imports(logical_line):
 if (re.match(unittest_imports_from, logical_line) or re.match(unittest_imports_dot, logical_line)):
  msg = ("N334: '%s' must be used instead of '%s'." % (logical_line.replace('unittest', 'unittest2'), logical_line))
  (yield (0, msg))

@ core . flake8ext @ core . off_by_default def check_unittest_imports ( logical_line ) : if ( re . match ( unittest_imports_from , logical_line ) or re . match ( unittest_imports_dot , logical_line ) ) : msg = ( "N334: '%s' must be used instead of '%s'." % ( logical_line . replace ( 'unittest' , 'unittest2' ) , logical_line ) ) ( yield ( 0 , msg ) )
n334 - use unittest2 instead of unittest .