Python unit testing - pytest introduction

preview_player
Показать описание
We are going to discuss python unit testing in this tutorial. We will see python’s testing frameworks for automated test, how to install pytest using pip, unit test coding, assert statement in unit test and what is”-v” command.

Topics that are covered in this Python Video:
0:00 Overview
0:19 Python's testing frameworks for automated test
1:12 Install pytest using pip
3:31 Unit test coding
4:50 Assert statement in unit test
7:18 What is "-v" command

Next Video:

Рекомендации по теме
Комментарии
Автор

I like that pip didn't run on the first try, and he showed us how to fix it. That was cool.

cisdolce
Автор

A good programmer will always taste his code.
Good stuff.

Zaraken
Автор

Machine learning tutorials with exercises:

codebasics
Автор

Concise, useful, a touch of humor.
Nicely done.

kennethsizer
Автор

in order to install pytest, you changed the permission of installation directory. it works but it is not a great solution

it will work if you run command prompt as administrator.

naitikgala
Автор

Use "pip install pytest --user" instead of changing the directory permissions!

Pterryreal
Автор

Nice tutorial. Short and sweet to the point.

techcode_man
Автор

So you advise to give all users write permission to the folder instead of running the shell with admin rights?! 😏

tinokanngieer
Автор

A good programmer will always give write permission to all users instead of using an elevated prompt.

evolagenda
Автор

Thank you ! I was having the same problem with the installation, you saved me :) !

hexene
Автор

Very clear! I'll see all your tutorial!

backpack
Автор

Very nice and simple explanation!!!Thanks a lot

pallavigoel
Автор

sir will you please suggest why it is better than pyunit and docunit. I am not able to find a proper answer.

priyakatyal
Автор

Wow great content. It's hard to find videos on this topic. Thanks!

imxron
Автор

hahah dude, that meme in the beginning.
About a week and a half ago I started a personal toy project that is now 1640 lines long. The yesterday I broke it and I felt a little panic I haven't felt in a while... I can't imagine how it feels if that happened in any costly way!.

Also, every time I change a function, I have to manually run all the functions that depend on that little tidbit... also, every line of code I type, I have to have in mind how all the code works... i'm becoming a "why you should test your code" poster boy.

alfonshomac
Автор

I am waiting for django unit test example ....
good job #codebasis ...

tdevendra
Автор

on mac with el capitan, this worked: sudo pip install pytest --upgrade --ignore-installed six

msrunner
Автор

Hi. The python -m pytest works for me but when it comes to the the py.test and py.test-v, there’s error stating “cannot find path”, “not recognized” or “can’t open file”, .. Any idea on how to fix it everyone? Thank you sooo much

nhungvo
Автор

Thank you! This video was very helpful.

maricampbell
Автор

Awesome video :)
thank you very much and Pura Vida from Costa Rica :)

felipesalascasasola