#100DaysOfCode in Python Transcripts
Chapter: Days 10-12: Testing your code with pytest
Lecture: Lesson introduction
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Welcome back to the Hundred Days of Python. In the coming three days I will show you how you can test the program with pytest.
0:07
It's a popular testing framework, often preferred over the standard libraries unittest. And you will see why.
0:14
For this lesson I prepared a guessing game, which lets you guess a number from the command line. And although is a simple program,
0:21
it has a lot to offer in showing how to use pytest, for example to validate errors, capture standard output, mocking certain functionality, and more.
0:32
By writing the test, I will also show you how you can use coverage, to see how much of your code base, or in this case, the script is covered by tests.
0:42
And by the end of this session, it should be easy for you to write tests for your code, an important skill.