Skip to content

Commit

Permalink
Added simple testing of the README to make sure it includes a mention…
Browse files Browse the repository at this point in the history
… of each code file
  • Loading branch information
diara628 committed Oct 29, 2010
1 parent 595cd50 commit a718a8b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test_docs.py
@@ -0,0 +1,17 @@
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
if not name.startswith('test_'):
metafunc.addcall(funcargs=dict(filename=fpath.basename))

def test_README(filename):
README = dirpath.join('README').read()

assert filename in README

0 comments on commit a718a8b

Please sign in to comment.