[Pytest-commit] [hpk42/pytest] Reduced functionality for setup methods (issue #278)

mears issues-reply at bitbucket.org
Tue Mar 19 20:26:02 CET 2013


--- you can reply above this line ---

New issue 278: Reduced functionality for setup methods
https://bitbucket.org/hpk42/pytest/issue/278/reduced-functionality-for-setup-methods

mears:

Consider a setup method that needs to receive funcargs.

1. py.test does not dependency inject arguments into xUnit style setup methods.  I believe it should
2. In earlier 2.3 builds there was a decorator @pytest.mark.setup that could be used to designate a setup method that could use funcargs.  This no longer works in 2.3.4.
3. Regarding #2, you might say, well use use a standard fixture with autouse=True.  The problem here is that when using autouse, you **cannot** combine a different scope.  This is fine if you want a setup method with function scope, but not if you want a setup to run at the module level.


@pytest.mark.setup should be fixed or dependency injection should be added for setup/teardown.


--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.


More information about the pytest-commit mailing list