--- you can reply above this line ---
New issue 203: funcarg/fixture uses a different reference to object
https://bitbucket.org/hpk42/pytest/issue/203/funcarg-fixture-uses-a-different-reference
eduardo schettino:
Something like this (using old funcargs) used to work on 2.2
but now fails on 2.3.
#!python
import pytest
class TestClass:
@pytest.fixture()
def my_setup(self, request):
self.foo = True
def test_method1(self, my_setup):
assert self.foo
The object instance used to run the test is different from
the instance used to calculate the value of the fixture.
So modification to "self" in the fixture are lost.
--
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.
_______________________________________________
py-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev