def check_testfile_dir_structure(filename):
  """
  Checks if the test file has correct directory structure for importing as module
  Makes sure there is no directory with same testfile name to cause conflict
  """
  dirname =  os.path.splitext(filename)[0]
  if os.path.isdir(dirname):
    raise ValueError('incorrect dir structure testfile:%s exist in same level as dir:%s' %(filename,dirname))
def check_testfile_dir_structure ( filename ) : dirname = os . path . splitext ( filename ) [ 0 ] if os . path . isdir ( dirname ) : raise ValueError ( 'incorrect dir structure testfile:%s exist in same level as dir:%s' % ( filename , dirname ) )
Checks if the test file has correct directory structure for importing as module
  Makes sure there is no directory with same testfile name to cause conflict