Created
April 15, 2013 01:22
-
-
Save bobsilverberg/5385035 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| import pytest | |
| from unittestzero import Assert | |
| class TestHomepage(): | |
| def pytest_funcarg__my_funcarg(request): | |
| print 'entering pytest_funcarg__my_funcarg...' | |
| print 'exiting pytest_funcarg__my_funcarg' | |
| return True | |
| @pytest.fixture(scope='function') | |
| def my_fixture(request): | |
| print 'entering my_fixture...' | |
| print 'exiting my_fixture' | |
| return True | |
| def test_reruns(self, my_funcarg): | |
| print 'running the test' | |
| Assert.true(my_funcarg, 'my_fixture was not populated') | |
| Assert.true(False, 'forcing a failure to create a rerun') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment