Reputation: 151
When I run the following code, pytest gives me a failure. From my understanding based on the docs and a question I asked on this plugin it should be returning an error.
I made a custom plugin just for this problem and the root of the issue seems to be that both setup and teardown pass, while call fails, hence why it's registering as a failure and not an error. I guess the better question is why doesn't setup fail?
I'm running on windows using pytest 3.1.2. Pip list shouldn't matter, though I will note that I don't have the above mentioned plugin installed and that my custom plugin only prints information.
I'm not sure if this is a bug or just my misunderstanding, so I decided to post both here and on pytest's github. Thank you for the help
import pytest
import unittest
class base(unittest.TestCase):
def setUp(self):
raise ValueError
class test(base):
def test(self):
print("Hello")
pytest.main()
Upvotes: 1
Views: 360