Mercurial > code > home > repos > rdfdb
diff tasks.py @ 81:8d3c3e7cfb54
(barely) runnable demo service instance
author | drewp@bigasterisk.com |
---|---|
date | Mon, 04 Apr 2022 11:25:05 -0700 |
parents | 22c9679dbf67 |
children | 8a9f8dc65da8 |
line wrap: on
line diff
--- a/tasks.py Mon Apr 04 11:01:59 2022 -0700 +++ b/tasks.py Mon Apr 04 11:25:05 2022 -0700 @@ -12,4 +12,18 @@ @task def test(ctx): - ctx.run('pdm run nose2 -v rdfdb.currentstategraphapi_test rdfdb.graphfile_test', pty=True) + test_forever(ctx, forever=False) + + +@task +def test_forever(ctx, forever=True): + watchdir = 'rdfdb' + testdir = 'rdfdb' + ctx.run(f'pdm run pytest {testdir}', pty=True) # ptw doesn't do an initial run + if forever: + ctx.run(f'pdm run ptw {watchdir} {testdir}', pty=True) + + +@task +def demo(ctx): + ctx.run('PYTHONPATH=. pdm run python3 rdfdb/service.py -v', pty=True)