Pytest Master Class Full Course

Subscribers:
17,700
Published on ● Video Link: https://www.youtube.com/watch?v=IN4qt-9bMiE



Duration: 2:46:31
3,900 views
89


Pytest Master Class Full Course

Learn to master testing in Python with Pytest from Five Time O'Reilly Author and AWS ML Hero Noah Gift

Pytest is a testing framework for Python that allows you to write tests in a readable and concise way.
This close to three-hour course will teach you how to write tests in Python using Pytest as well as master CI/CD with Pytest.
Take your testing and DevOps skills to the next level with this full-course Pytest Master Class.

Topics Covered Include:

* 00:00 Introduction
* 03:38 What is DevOps?
* 05:32 Github CodeSpaces
* 09:45 Create Python Project Structure: Makefile, requirements.txt, test file and virtualenv
* 16:33 Importing code with IPython
* 17:32 Writing tests with Pytest
* 21:58 Using Pylint
* 23:56 Verifying Pylint bad syntax catch
* 25:41 Formatting code with Black
* 26:38 Pinning requirements to a specific version
* 30:00 Setup Github Actions
* 37:38 Matrix Testing multiple versions of a Python 3.6, 3.7, 3.8, 3.9 with Github Actions
* 50:00 Using AWS CloudShell
* 53:00 Using AWS Cloud9
* 54:07 Adding virtualenv to ~/.bashrc
* 57:24 Using AWS CodeBuild
* 01:17:01 Testing Google Colab Notebooks and Jupyter Notebooks with nbval and Pytest
* 01:29:39 Using pdb;pdb.set_trace() and ipdb;ipdb.set_trace()
* 01:35:53 Using pytest-cov
* 01:37:47 Using pytest with --pdb pdb debbuging during tests
* 01:38:12 Using pytest with --pdb --maxfailures 1 to stop after first failure
* 01:42:20 Using pytest to test a single test
* 01:49:25 Using Pytest with fixtures
* 01:56:23 Using Pytest setup_function and teardown_function to setup and teardown of tests
* 02:00:00 Using flask web framework
* 02:04:25 Testing flask web framework with pytest
* 02:10:46 Extending flask with a greedy coin change machine
* 02:21:27 Using click to create a command line interface
* 02:30:39 Using Pytest to test click command line interfaces
* 02:44:42 Matrix testing entire project with click, pytest, and nbval using Github Actions and multiple versions of Python 3.6, 3.7, 3.8, 3.9

Learning Objectives

This course covers the following learning objectives:

- Learn to master Pytest.
- Learn to setup CI/CD pipelines with Pytest, Pylint, Python Black Formatting, Github Actions and AWS CodeBuild.
- Learn to use Cloud-based development environments with Pytest like Githhub CodeSpaces, AWS Cloud9 and AWS CloudShell
- Learn to create local test environments with Pytest and Virtualenv
- Learn to use advanced functions like Pytest test selection, pdb (python debugger) and fixtures.
- Learn to build realistic problems including libraries, building command-line tools with Click and web frameworks with Flask.
Buy a copy of Testing in Python on Amazon: https://www.amazon.com/Testing-Python-Robust-Professionals/dp/B0857CFM17

Buy a copy of Python for DevOps on Amazon: https://www.amazon.com/Python-DevOps-Ruthlessly-Effective-Automation/dp/149205769X

Buy a copy of Practical MLOps: https://www.amazon.com/Python-DevOps-Ruthlessly-Effective-Automation/dp/149205769X If you enjoyed this video, here are additional resources to look at:

Coursera + Duke Specialization: Building Cloud Computing Solutions at Scale Specialization: https://www.coursera.org/specializations/building-cloud-computing-solutions-at-scale

O'Reilly Book: Practical MLOps: https://www.amazon.com/Practical-MLOps-Operationalizing-Machine-Learning/dp/1098103017

O'Reilly Book: Python for DevOps: https://www.amazon.com/gp/product/B082P97LDW/

Pragmatic AI: An Introduction to Cloud-based Machine Learning: https://www.amazon.com/gp/product/B07FB8F8QP/

Pragmatic AI Labs Book: Python Command-Line Tools: https://www.amazon.com/gp/product/B0855FSFYZ

Pragmatic AI Labs Book: Cloud Computing for Data Analysis : https://www.amazon.com/gp/product/B0992BN7W8


Pragmatic AI Book: Minimal Python: https://www.amazon.com/gp/product/B0855NSRR7

Pragmatic AI Book: Testing in Python: https://www.amazon.com/gp/product/B0855NSRR7

Subscribe to Pragmatic AI Labs YouTube Channel: https://www.youtube.com/channel/UCNDfiL0D1LUeKWAkRE1xO5Q

View content on noahgift.com: https://noahgift.com/

View content on Pragmatic AI Labs Website: https://paiml.com/







Tags:
devops
ci/cd
testing
pytest
cloud9
github
codespaces
code build
flask
click
python