[TIP] [announce] rgf, an rspec-inspired python testing framework

Matt Patterson matt at reprocessed.org
Fri Jun 1 07:09:49 PDT 2012


Hello there,

I've been working on https://github.com/fidothe/rgf for a little bit, after coming back to Python development after a long time writing mostly Ruby.

I've been using Unittest in a Django project and I've been finding (leaving aside issues of the expectation/matcher stuff) the class-based approach quite constraining, specifically:

* no easily nested context for when you want to an extra bit of setup code over a few tests, but really don't want to duplicate the setup from your test class in another.
* no easy-to-access long test names
* discovery still a pain.

Anyway, I started work on rgf to satisfy my curiosity (could it be done?) and to see how it felt to use. I'm pretty happy with the basics, but there's a long way to go. 

I'd be really interested to find out it other Python folk found it a (potentially) useful addition, and also to talk to anyone involved in writing mocking libraries - one of my longer-term aims with rgf is to provide an API for things like mock libraries to hook into to enable easy post-test verification of assertions on calls to mocks, which could hopefully enable significantly more compact syntax in a lot of common cases for mocks.

Feedback gratefully received :-)

Matt


-- 
  Matt Patterson | Design & Code
  <matt at reprocessed org> | http://www.reprocessed.org/






More information about the testing-in-python mailing list