You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python -m pytest test/test_app.py::TestApp::test_hello_world
================================================================================================== test session starts ===================================================================================================
platform darwin -- Python 3.8.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/user/parametized_bug
collected 0 items
================================================================================================= no tests ran in 0.03s ==================================================================================================
ERROR: not found: /Users/user/parametized_bug/test/test_app.py::TestApp::test_hello_world
(no name '/Users/user/parametized_bug/test/test_app.py::TestApp::test_hello_world'in any of [<Module test/test_app.py>])
If I change test_app.py to:
fromunittestimportTestCasefromappimporthello_worldclassTestApp(TestCase):
deftest_hello_world(self):
arg1="Mars"result=hello_world(arg1)
self.assertEqual(result, f'Hello world {arg1}!')
By having the following project structure in a folder called
parametized_bug
:where app.py:
and test_app.py:
If I run the following
But if I run it as this other way, it fails:
If I change test_app.py to:
When I run it again, it works:
The text was updated successfully, but these errors were encountered: