[TIP] New nose plugin: nose-testconfig

Jesse Noller jnoller at gmail.com
Tue Jul 29 04:33:29 PDT 2008


Following up on my email from a little while ago about passing in test
configuration data to nose, I've released an "alpha" of a nose plugin
that, while dirty and loose, does the job.

http://pypi.python.org/pypi/nose-testconfig/

It's only about 104 lines of code, and doesn't use a lot of nose
internals. I wanted something simple enough to be easy to maintain,
but loose enough to allow me to do "really interesting" things with
the test configuration data.

Right now, it supports INI-style, YAML and pure Python code (via exec)
configuration files. I rely on the parsers themselves to verify the
basic format of the configuration files is correct, when using
exec/eval, I also trust that the syntax of the file/values is correct
python.

Obviously blind execution of code can be dangerous, but given we're
talking about controlled testing environments, security was not
something I wanted to worry about initially.

Take a look, try it out. I'm going to be uploading it to google code
later today, and I will be more than open to accept
changes/suggestions. Like I said - I wanted to err on the side of
simplicity and brevity rather than making a complex system for
configuration management.

-jesse



More information about the testing-in-python mailing list