disqus / gutter

Fully featured Python feature switch toolkit
Apache License 2.0
226 stars 30 forks source link

More fine grained control to testutils.switches #2

Closed Fluxx closed 11 years ago

Fluxx commented 11 years ago

Using testutils.switches is great for forcing a switch on or off globally, but there are cases where you want to have more fine grained control:

  1. More accurate tests. You can make sure that you actually pass the input into active, which I have forgotten to do in the past.
  2. Allows you to have active return True or False differently during the course of a test.

Now, you can do this with a mock side_effect but really gutter should support this natively.