probcomp/Venturecxx

Use @gen_for_each to tidy up the test suite

Opened this issue · 0 comments

axch commented

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.