Introductory Tutorial on Unit Testing Python Functions with Pytest, Visual Studio Code, Command-line

Veröffentlicht am: 22 September 2020
auf dem Kanal: Kris Jordan
70,256
1.1k

0:00 The BIG IDEA of automated testing: write code to test other code
4:50 Example of setting up a skeleton function for test-driven development
6:36 Developing expected use cases and edge cases
7:38 Setting up a pytest Test Module with a Python file ending in a _test.py suffix
9:56 Setting up test functions in pytest with functions whose names begin with test_
10:30 Using the assert keyword to confirm some boolean truth or fail a test otherwise
12:04 Running pytest from the Command-Line Interface as a Python3 module
13:47 Reading the output of a failed test in pytest's command-line output
17:23 Correctly implementing the total function to pass tests
19:25 Adding an additional test to verify an additional use case of total function
20:45 Using VSCode's Python extension to run tests directly in VSCode's interface
22:43 How-to fix the "Test discovery error, please check the configuration settings" error in VSCode's Pytest runner
26:30 How to follow Test-driven Development best practices when writing pytest function tests
28:57 Tutorial of test-driven development for a single function in pytest: a join function
34:10 Establishing a skeleton function for join function test-driven case study
35:33 Adding test cases for some use cases and edge cases of join
41:02 Correctly implementing the join function
47:58 Testing is no substitute for critical thinking! How to write tests with good code coverage.

To install pytest with Python3, substitute PYTHON with your : PYTHON -m pip install pytest


Auf dieser Seite können Sie das Online-Video Introductory Tutorial on Unit Testing Python Functions with Pytest, Visual Studio Code, Command-line mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Kris Jordan 22 September 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 70,256 Mal angesehen und es wurde von 1.1 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!