Created
March 17, 2015 23:13
-
-
Save wrobstory/bc7636e3254ca733f2d8 to your computer and use it in GitHub Desktop.
Py.test Fixture error
This file contains 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
import pytest | |
def setup_function(function): | |
foo = 1 | |
function(foo) | |
def test_thing(thing): | |
two = thing + 1 | |
assert two == 2 |
This file contains 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
(.env)Robs-MacBook-Pro:tests robstory$ py.test fixtures.py | |
====================================================================================================== test session starts ======================================================================================================= | |
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.4 | |
collected 1 items | |
fixtures.py E | |
============================================================================================================= ERRORS ============================================================================================================= | |
__________________________________________________________________________________________________ ERROR at setup of test_thing __________________________________________________________________________________________________ | |
file /Users/robstory/simple/data101/tests/fixtures.py, line 7 | |
def test_thing(thing): | |
fixture 'thing' not found | |
available fixtures: pytestconfig, recwarn, monkeypatch, capfd, capsys, tmpdir | |
use 'py.test --fixtures [testpath]' for help on them. | |
/Users/robstory/simple/data101/tests/fixtures.py:7 | |
==================================================================================================== 1 error in 0.01 seconds ===================================================================================================== | |
(.env)Robs-MacBook-Pro:tests robstory$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment