Skip to content

Setup the database and test environment on runner creation instead of before testing #1

@thedrow

Description

@thedrow

Since the Such DSL does not allow using the parameters plugin yet (See nose-devs/nose2#139) I am forced to do the following:

with such.A('foo') as it:

  for foo in Foo.objects.all(): # Gets objects from real database
    @it.should("do bar for foo (#%d)" % foo.id)
        def do_bar(case):
          # use foo here
          foo.bar() # uses the test database.

  it.createTests(globals()) 

I'd rather have the database setup on runner creation if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions