[TIP] integrating unittest TestSuite with py.test

chris.dent at gmail.com chris.dent at gmail.com
Mon Jan 26 15:35:01 PST 2015

I've created a tool called gabbi[1] which generates TestCases and
TestSuites from YAML files containing representations of HTTP requests
and responses. It works well in a unittest (and derivatives) domain.

I've had a request to get it working with pytest. I know how to do
this from scratch (I also have a less featureful precursor to gabbi
that worked with pytest's ability to yield tests) but I'm struggling
to get it working using the TestSuites and TestCases that the new
system generates. I suspect this is in part that I'm generating the
TestCases using some metaclass magic and doing discovery with the
load_tests protocol.

I'm willing to write an alternate implementation that supports pytest
if that ends up being required but I'd prefer to reuse what I've
already got.

Rather than repeat myself, I'll point at a question I posted on
StackOverflow which contains more details.


Thanks for any ideas or suggestions.

[1] http://gabbi.readthedocs.org/

Chris Dent                                   http://burningchrome.com/

More information about the testing-in-python mailing list