Issue #329 resolved

skipif requires expression as a string, example in documentation is wrong.

Auke Willem Oosterhoff avatarAuke Willem Oosterhoff created an issue

The documentation on about skipIf contains an example with an error. The expression of skipIf must be a string, if not you'll get this error:

Error evaluating 'skipif' expression
Failed: expression is not a string

The expression must be wrapped into quotes. Also it would be better to mention the string requirement explicitly. Because

Explicit is better than implicit.

Tested in platform linux2 -- Python 2.7.3 -- pytest-2.3.5

Comments (8)

  1. holger krekel

    Actually, the docs were for a few days wrong on - they showed the documentation for the upcoming 2.4 release, my fault. I've reverted to the 2.3.5 docs now. Otherwise Anatloy is right but it refers to 2.4.

  2. 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
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.