New issue 538: Fixture scope documentation
https://bitbucket.org/hpk42/pytest/issue/538/fixture-scope-documentation

Mark Stacey:

The 
[http://pytest.org/latest/fixture.html](http://pytest.org/latest/fixture.html) 
briefly mentions the possibility of a fixture with class scope in the beginning 
summary, but it isn't mentioned anywhere else in the document. I had to check 
the source code to see if this was possible.


Also, I didn't see any mention that the default scope was "function" - it was 
implied, but not explicit.


I think it would be helpful to include a full list of available scopes, and to 
explicitly say that  function scope is default. Both of these things are 
included in the docstring for the fixture function in the source code:


```
#!python

:arg scope: the scope for which this fixture is shared, one of
                "function" (default), "class", "module", "session".
```


_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to