Skip to content

Use @gen_for_each to tidy up the test suite #682

Open
@axch

Description

@axch

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions