[TIP] gabbi now works with pytest..almost

chris.dent at gmail.com chris.dent at gmail.com
Sat Apr 16 03:36:21 PDT 2016


On Thu, 7 Apr 2016, chris.dent at gmail.com wrote:

> The latest release of gabbi, a testing library for HTTP APIs,
> finally has support for running the tests it generates with pytest.
>
>  https://pypi.python.org/pypi/gabbi
>
> It works just fine when running all the tests in a suite but when
> selecting just one test it doesn't execute a special and desirable
> feature (described below). This isn't a deal breaker but if people
> have ideas on how to make it work that would be very helpful.

For completeness:

Turns out that I was making the tests run differently than I thought
I was such that the 'run' method on each test was not actually being
called directly and result handling was incorrect. Not only was the
above problem there, failed tests weren't reporting! Fixing it was
messy but now the correct behavior is in place:

https://github.com/cdent/gabbi/commit/281a660e8286b393ac5efcecbed765cc61fbedd5

It's pretty clear that getting pytest integration to be clean is
going to require more effort, but at least it is working (mostly)
now.

-- 
Chris Dent                                   http://burningchrome.com/
                                 [...]



More information about the testing-in-python mailing list