Hello Holger, * holger krekel <[email protected]> [2014-04-07 10:24]: > On Fri, Apr 04, 2014 at 11:21 +0200, Wolfgang Schnerring wrote: > > is there a way to access a fixture object from inside a unitest.TestCase > > test function? > Right, any "usefixture" needs to either have a global side effect > or stick some object to "self". > @pytest.fixture(autouse=True) > def set_tmpdir(self, tmpdir): > self.tmpdir = tmpdir
Thanks for the hint! Using a method of the TestCase as a wrapper fixture around the actual fixture is clever, but also a little unwieldy... would there be an easy way to introduce an API to make that easier? Wolfgang _______________________________________________ Pytest-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytest-dev
