MCAD-Library/test_compile.py

15 lines
460 B
Python
Raw Normal View History

2010-07-26 09:35:32 -05:00
from openscad_utils import *
def pytest_generate_tests(metafunc):
if "mod_name" in metafunc.funcargnames:
for fpath, mod_names in collect_test_modules().items():
for mod_name in mod_names:
metafunc.addcall(funcargs=dict(mod_name=mod_name, mod_file=fpath))
temppath = py.test.ensuretemp('MCAD')
def test_func(mod_name, mod_file, capfd):
fpath = temppath.join(mod_file.base_name)
call_openscad(path=fpath)