pytest 2.3 / moin test issues

Thomas Waldmann avatarThomas Waldmann created an issue

there is a bug that makes pytest 2.3.2 unusable for typical flask apps, see:

https://bitbucket.org/hpk42/pytest/issue/214/pytest-blows-up-when-collecting-modules

after that is solved and the attached patch is applied to our store tests, it should work for us, but still doesn't - likely there is something strange in our conftest.py that makes (pytest's) request.param malfunction somehow. see also http://codereview.appspot.com/6775084 (same as the patch, for review)

needs more research - until it is fixed we require < 2.3 by setup.py.

Comments (2)

  1. Thomas Waldmann

    current state from my workdir.

    as seen in the log, there are a lot of failures/errors still that I can not explain (e.g. test_serialization fails because there is no app context, but tstapp is a autouse fixture, so there should be an app context).

    other failures are somehow expected, e.g. if an app/request context is required by setup_method() - such stuff should be replaced by fixtures.

  2. holger krekel

    I've updated pytest on pypi.testrun.org. version 2.3.4dev6:

    • fixes an autouse issue where autouse fixtures would not be considered in certain cases (off-by-one error internally)

    • makes yielded functions honour autouse fixtures, this is a bit a experimental but seems to work (now all tests in MoinMoin/converter/_tests/test_creole_in.py pass for example)

    there are still failures but i think they are mostly due to unconverted tests?!

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.