How to write unit tests in Python using pytest and PyCharm

preview_player
Показать описание
Watch this video to learn how to write your first test using pytest in PyCharm. You will learn how easy it is to create, name, and run it with PyCharm and how the IDE’s code completion helps you along the way.

Dive into our tutorial series on how to make using pytest simpler and more efficient with PyCharm, allowing you to deliver quality code even faster. Step-by-step, you’ll learn how to get started with pytest in PyCharm, fix errors in your code, skip specific tests, and more.

🔗 Useful links:

#pytest #pytesttutorial #learnpytest #softwaretesting #python #pycharm #jetbrains
Рекомендации по теме
Комментарии
Автор

at 0:45 the "Create test" window, doesn't suggest creating a test function. I made it manually. Also, at 0:58 the gutter icon didn't show up next the "def test_player()" after following the instruction. It did after I ran "pip install pytest " on the terminal.

caitlinmclaren
Автор

the only thing i need with pycharm when i download it is the charm

Sirbozo
Автор

I followed the exact instructions and it failed with the following error:

--path
Testing started at 17:47 ...


Ran 0 tests in 0.000s

NO TESTS RAN
Launching unittests with arguments python -m unittest in


Process finished with exit code 5

Empty suite


Executing pytest in the base folder works without problems.

caiust
welcome to shbcf.ru