[TIP] doctest fixtures in nose

Benji York benji at benjiyork.com
Mon Jan 7 09:19:48 PST 2013


On Mon, Jan 7, 2013 at 4:35 PM, Barry Warsaw <barry at python.org> wrote:
> I opened this issue in nose's tracker:
>
> https://github.com/nose-devs/nose/issues/594
>
> and my thoughts were to add a --doctest-fixture (singular) option which would
> name a module using dotted-notation that would be the generic fixture.  So
> e.g. I could add:
>
> --doctest-fixture=mypackage.subpkg.testing.doctest_fixture
>
> and nose would import that module as the fixture (i.e. it would be on
> sys.path).  I suggest allowing --doctest-fixtures (plural) to still allow for
> overriding doctest fixtures on a per-doctest basis.

How would that work if you have several sets of tests, each with their
own fixtures?  Say, organized in a fixture-per-directory arrangement?
-- 
Benji York



More information about the testing-in-python mailing list