Effective PyCharm (2021 edition) Transcripts
Chapter: Unit testing
Lecture: Testing introduction
0:02 Unit testing and having tests for your software in general is one of the key indicators
0:07 of professional software and it really separates the amateur beginner hobby types of projects from things
0:15 that are meant to be long lasting and have to work because your service up time
0:20 depends on it or people aren't paying money for it.
0:24 And PyCharm has deep support for unit testing and other types of testing across all
0:30 the major frameworks in python. PyTest knows the built in unit tests and more
0:35 You also see that it has great integration with related technologies such as code coverage
0:42 So if I want to run some tests and I want to know how well
0:46 are these tests, testing my code,
0:48 one of the things you need to know as well,
0:50 what part of your code is it even running and could coverage tells you that And
0:53 the visualizations and integration of code coverage with unit tests and PyCharm is absolutely second
0:59 to none. It's amazing. It even has support for running tests every time that
1:03 you save a change to a file.
1:05 So once you have your tests in place you can check a little button and as
1:08 you edit your code, it just has a little light green or red.
1:12 Are the test currently passing? Are they currently failing continuously throughout your day as you
1:18 work? So there's a lot of cool things to explore in testing the PyCharm and we get them in this chapter.