conftest.py 299 B

123456789101112
  1. import glob
  2. from baker import load
  3. def pytest_generate_tests(metafunc):
  4. if 'cfg' in metafunc.fixturenames:
  5. configs = []
  6. for name in glob.glob('tests/*yaml'):
  7. cfg = load(name)
  8. configs.append(cfg)
  9. metafunc.parametrize("cfg", configs)