Quantcast
Channel: Getting empty test suite when running with pytest from pycharm - Stack Overflow
Browsing latest articles
Browse All 10 View Live

Answer by lex82 for Getting empty test suite when running with pytest from...

I had the same problem. It was caused by a circular import in a super class of my test. When I tried to run this super class (which has no tests itself) directly I saw the error message.

View Article



Image may be NSFW.
Clik here to view.

Answer by Ashok Sanke for Getting empty test suite when running with pytest...

I got same error and figured out the definition name doesn't have "test_",Example :Before error :class TestExample2 :def editProfile(self, dataLoad): print(dataLoad) print(dataLoad[1])after fix :class...

View Article

Image may be NSFW.
Clik here to view.

Answer by shubham roy for Getting empty test suite when running with pytest...

In my case I had only change the class name with test in starting and that resolved my issue.

View Article

Answer by user18168265 for Getting empty test suite when running with pytest...

Make sure your conftest.py file is in same folder.If you are using fixtures. Add "Test" keyword in class name (example = TestClass)@pytest.mark.usefixtures("setup1")class TestClass: def test_abc(self):...

View Article

Answer by Leo Liang for Getting empty test suite when running with pytest...

In my case, test class contains init method, cause empty suite as well. What you need to do is to avoid to write init method.

View Article


Answer by Kerem for Getting empty test suite when running with pytest from...

For those using WSL, problem might be related to WSL being unaccessible.If you are getting this error on WSL,Logon failure: the user has not been granted the requested logon type at this computer.Try...

View Article

Answer by jalazbe for Getting empty test suite when running with pytest from...

In my case I had only to delete the pytest.ini file from the project.

View Article

Answer by picmate 涅 for Getting empty test suite when running with pytest...

Make sure that PyCharm is configured to use PyTest. By default it uses unittests. Checkout this doc: https://www.jetbrains.com/help/pycharm/choosing-your-testing-framework.html. Once you've correctly...

View Article


Answer by Belerafon for Getting empty test suite when running with pytest...

The name of your test file does not conform to a default pytest discovery rules. If you change x_tests.py to x_test.py it run the test and fails as expected. Take a look at this page for more info on...

View Article


Getting empty test suite when running with pytest from pycharm

I'm having issues with running pytest tests from inside PyCharmI have a file x_tests.py inside a folder called agents_automation_2 in C:\Temp, the content of the file isimport pytestdef test_mytest():...

View Article
Browsing latest articles
Browse All 10 View Live


Latest Images