Skip to content

Commit

Permalink
Update test to comply with new marker behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Jul 21, 2015
1 parent a0a005f commit 29420b5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions testing/test_nose.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,20 +300,19 @@ def test_fun(self):
result = testdir.runpytest()
result.assert_outcomes(passed=1)

@pytest.mark.skipif("sys.version_info < (2,6)")

def test_setup_teardown_linking_issue265(testdir):
# we accidentally didnt integrate nose setupstate with normal setupstate
# this test ensures that won't happen again
testdir.makepyfile('''
import pytest
class TestGeneric(object):
def test_nothing(self):
"""Tests the API of the implementation (for generic and specialized)."""
@pytest.mark.skipif("True", reason=
"Skip tests to check if teardown is skipped as well.")
class TestSkipTeardown(TestGeneric):
class TestSkipTeardown(object):
def test_nothing(self):
pass
def setup(self):
"""Sets up my specialized implementation for $COOL_PLATFORM."""
Expand All @@ -324,7 +323,7 @@ def teardown(self):
raise Exception("should not call teardown for skipped tests")
''')
reprec = testdir.runpytest()
reprec.assert_outcomes(passed=1, skipped=1)
reprec.assert_outcomes(passed=0, skipped=1)


def test_SkipTest_during_collection(testdir):
Expand Down

0 comments on commit 29420b5

Please sign in to comment.