New issue 671: missing fixture setup for doctest module items https://bitbucket.org/hpk42/pytest/issue/671/missing-fixture-setup-for-doctest-module
Buck Evan: For a lack of deep understanding, I'm just transcribing our #pylib conversation to this ticket: ``` (12:58:14 PM) buck11: I don't see that my autouse fixture is running for my doctests, counter to documentation (12:58:39 PM) buck11: known bug? also its quite possible i'm doing it wrong 13:00 (01:01:52 PM) buck11: =/ 13:50 (01:50:31 PM) ronny: buck11: afair doctest fixture integration is not there (01:50:48 PM) buck11: docs explicitly say its there (01:50:50 PM) ronny: (doctests run with custom items, i reall they arent able to handle fixtures) (01:50:50 PM) buck11: sec (01:51:06 PM) ronny: there is a utility function to get fixture values (01:51:10 PM) buck11: http://pytest.org/latest/doctest.html (01:51:12 PM) ronny: but afair autouse is not there (01:51:16 PM) buck11: Also, using fixtures from classes, modules or projects and autouse fixtures (xUnit setup on steroids) fixtures are supported when executing text doctest files. (01:51:40 PM) buck11: "when executing text doctest files" (01:51:42 PM) ronny: hmmm, what version do you run then (01:51:44 PM) buck11: i guess is the key clause (01:51:51 PM) buck11: i was doctesting code (01:52:04 PM) buck11: i updated a second ago (01:53:21 PM) ronny: buck11: i checked the code, the doctest text file has explicit code for that detail, the doctest module thing hasnt (01:53:36 PM) buck11: hrm i expected them to be more similar (01:53:42 PM) buck11: shrug 13:55 (01:55:01 PM) ronny: buck11: doctest is a bit messy, there is also fixture code in the doctest modules (01:55:09 PM) ronny: buck11: how are your fixtures scoped? (01:55:36 PM) buck11: it was forced to be function scope, because i wanted to leverage monkeypatch fixture (01:55:50 PM) buck11: i've solved it a different way entirely now (01:56:42 PM) buck11: ronny: https://github.com/bukzor/python-clom/commit/04e3bab93#diff-1 (01:56:47 PM) buck11: sadness, but it works (01:56:48 PM) ronny: hmm, as far as i can tell docestmodule can use a overhaul, unlike the textfile, it doesnt use FixtureRequest._fillfixtures (01:57:58 PM) ronny: buck11: can you report a bug? (01:58:08 PM) buck11: i dont know what the bug i (01:58:09 PM) buck11: s (01:58:24 PM) ronny: missing fixture setup for doctest module items ``` Responsible: RonnyPfannschmidt _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit