2010-10-29 03:46:12 -05:00
|
|
|
import py
|
|
|
|
|
|
|
|
dirpath = py.path.local("./")
|
|
|
|
|
|
|
|
def pytest_generate_tests(metafunc):
|
|
|
|
if "filename" in metafunc.funcargnames:
|
|
|
|
for fpath in dirpath.visit('*.scad'):
|
|
|
|
metafunc.addcall(funcargs=dict(filename=fpath.basename))
|
|
|
|
for fpath in dirpath.visit('*.py'):
|
|
|
|
name = fpath.basename
|
2010-10-30 04:57:26 -05:00
|
|
|
if not (name.startswith('test_') or name.startswith('_')):
|
2010-10-29 03:46:12 -05:00
|
|
|
metafunc.addcall(funcargs=dict(filename=fpath.basename))
|
|
|
|
|
|
|
|
def test_README(filename):
|
|
|
|
README = dirpath.join('README').read()
|
|
|
|
|
|
|
|
assert filename in README
|