I'm new to unit testing and "im trying to run a pytest on Eclipse. I have searched for hours now and I cant seem to find out what the problem is. Im playing around with the simple examples from the https://pytest.org website. My problem is that pytest just does not run on Eclipse. I can use the command prompt to do the tests, but I would much rather have the results on the console window.
Things I have tried but didnt work;
- setting
PyUnittest runner toPy.testrunner (instead of the default Pydev test runner)
In this case I get the following error message
usage: runfiles.py [options] [file_or_dir] [file_or_dir] [...] runfiles.py: error: unrecognized arguments: --verbosity inifile: None rootdir: C:\peepee\pytest\testing
- I have set the verbosity to 9 (read somewhere that its the maximum). Didnt make any difference.
Simple code I'm trying to test from the http://pytest.org website
def func(x):
return x + 1
def test_answer():
assert func(3) == 5
Works through the cmd but not on Eclipse.
Please help, as I'm losing time on trying to figure this out. Thanks in advance