[py-dev] requiring options; handling crashes
Nicholas Riley
njriley at uiuc.edu
Sat Jul 1 06:59:58 CEST 2006
Hi,
I am starting a new project and and am attempting to give this
test-development development thingy a try, so I am starting to use
py.test. So far I'm finding it really natural and easy to understand
- especially compared with my short but unhappy experiences with
unittest writing tests for the Metakit Python binding.
I have a few questions.
First, is there a way to enforce options? For some of the tests I am
using Psyco, which does not play happily with py.test without
--nomagic, so I would like to require this option. I have tried
something like this in conftest.py:
import py
py.test.Config.parse(['--nomagic', '--nocapture', '--exitfirst'])
but that doesn't seem to work, and I'm not sure if there is supposed
to be a way.
Second, some of my tests crash the interpreter, so I'd prefer to test
every file individually (it's fine if no more tests run after the
crash :). Is there a sensible way to nest py.test invocations such
that the results are aggregated?
If the above aren't possible at the moment, I would be interested in
implementing them; any hints as to a good design or where the code
should go would be appreciated.
--
Nicholas Riley <njriley at uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
More information about the Pytest-dev
mailing list