Venturecxx icon indicating copy to clipboard operation
Venturecxx copied to clipboard

Use @gen_for_each to tidy up the test suite

Open axch opened this issue 7 years ago • 0 comments

When testing Mite, Anthony wrote this nice abstraction:

from nose.tools import make_decorator
def gen_for_each(items):
  def wrap(f):
    @make_decorator(f)
    def wrapped():
      for item in items:
        yield f, item
    return wrapped
  return wrap

There's a modest amount of boilerplate in the test suite that could be eliminated by using it.

axch avatar Nov 17 '17 02:11 axch