Skip to content

Instantly share code, notes, and snippets.

@peterjpxie
Created April 10, 2022 08:39
Show Gist options
  • Save peterjpxie/2387c9d6d76fdd3c7bb9fe998444f7bf to your computer and use it in GitHub Desktop.
Save peterjpxie/2387c9d6d76fdd3c7bb9fe998444f7bf to your computer and use it in GitHub Desktop.
_parametrize_setup.py
"""get input test case lists for parametrized tests"""
import os
from os import path
# root_path is parent folder of Scripts folder
root_path = path.dirname(path.dirname(path.realpath(__file__)))
test_case_list = []
input_root = path.join(root_path, "inputs")
for tc in os.listdir(input_root):
if tc.startswith("test_case"):
test_case_list.append(tc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment