def this_is_a_testdir(dirpath):
 return TESTDIR_RE.match(osp.basename(dirpath))

def this_is_a_testdir ( dirpath ) : return TESTDIR_RE . match ( osp . basename ( dirpath ) )
returns true if filename seems to be a test directory .