[TIP] integrating unittest TestSuite with py.test
opensource at ronnypfannschmidt.de
Thu Feb 19 00:14:37 PST 2015
py.test has its own collection mechanism,
writing a clollector should be rather straightforward
there are some examples of collecting tests
from yaml files in the documentation
there currently is no implementation of
the testcase loader protocol for pytest,
and unless someone steps up and creates it its unlikely to happen
On Tuesday, January 27, 2015 12:35:01 AM CEST, chris.dent at gmail.com wrote:
> I've created a tool called gabbi 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.
>  http://gabbi.readthedocs.org/
More information about the testing-in-python