Skip to content

Instantly share code, notes, and snippets.

@alvinchow86
Created September 13, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alvinchow86/82ff8671dd8db847e251 to your computer and use it in GitHub Desktop.
Save alvinchow86/82ff8671dd8db847e251 to your computer and use it in GitHub Desktop.
import pytest
class TestOne(object):
@pytest.fixture(autouse=True)
def setup(self):
5 / 0
self.foo = 'foo'
def test_one(self):
assert self.foo == 'foo'
class TestTwo(object):
@pytest.fixture
def setup(self):
5 / 0
self.foo = 'foo'
def test_two(self, setup):
assert self.foo == 'foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment