Modern Python Projects Transcripts
Chapter: Testing code
Lecture: Unittest vs. pytest
0:00 So, we wrote some codes, and now it's time to have some tests.
0:04 Otherwise, when we want to add new features,
0:06 we will have no way to tell, if the old code is still working fine or
0:11 if we introduce some bugs. Python comes with a unit test module that you
0:17 can use for writing tests, but most people use Pytest
0:21 Instead, it's a third party library,
0:23 which means that you have to install it with pip.
0:26 But it's much easier to use,
0:28 and at the same time, it's much more powerful in terms off additional features or command
0:33 line parameters. Let's see an example of how pytest is different than unit tests