-
- try:
- if metafunc.config.getoption('self_test'):
- filenames = [path.join(template_dir, s, f)
- for s in sub_dirs
- for f in listdir(path.join(template_dir, s))
- if path.isfile(path.join(template_dir, s, f)) and
- path.splitext(f)[-1] in extensions and
- check_basename_ending(template_type,
- path.splitext(f)[0])]
- else:
- filenames = [path.join(template_dir, f)
- for f in listdir(template_dir)
- if path.isfile(path.join(template_dir, f)) and
- path.splitext(f)[-1] in extensions and
- check_basename_ending(template_type,
- path.splitext(f)[0])]
-
- except Exception as e:
- print(e)
-
+ if metafunc.config.getoption('self_test'):
+ filenames = [path.join(template_dir, s, f)
+ for s in sub_dirs
+ for f in listdir(path.join(template_dir, s))
+ if path.isfile(path.join(template_dir, s, f))
+ and path.splitext(f)[-1] in extensions
+ and check_basename_ending(
+ template_type,
+ path.splitext(f)[0])]
+ else:
+ filenames = [path.join(template_dir, f)
+ for f in listdir(template_dir)
+ if path.isfile(path.join(template_dir, f))
+ and path.splitext(f)[-1] in extensions
+ and check_basename_ending(
+ template_type,
+ path.splitext(f)[0])]