RUVIDEO
Поделитесь видео 🙏

Writing automated tests for Python command-line apps and scripts

https://dbader.org/python-tricks ► Write clean and testable Python command line apps and learn by example

Two techniques for writing automated tests for your Python command-line applications and scripts.

In this video you'll see how to structure the entry points of your Python command-line scripts in order to make them easier to test with unit and integration tests using Python's unittest library.

You'll also learn how to use "mocking" and the @mock.patch decorator in the unittest library to put functions that have side-effects on the filesystem under test.

See examples of how these techniques are implemented in the project I show in the video:

- https://github.com/dbader/photosorter

This project gives you a blueprint for writing testable Python scripts and shows you how to run these tests on a build server (Jenkins, TravisCI, CircleCI, ...) using the pytest test runner.

Interested in the mypy type checker and the Python type annotations that appear in the video? This tutorial will help you get set up:

- https://www.youtube.com/watch?v=2xWhaALHTvU

FREE COURSE – "5 Thoughts on Mastering Python" https://dbader.org/python-mastery

SUBSCRIBE TO THIS CHANNEL: https://dbader.org/youtube

* * *

► Python Developer MUGS, T-SHIRTS & MORE: https://nerdlettering.com

FREE Python Tutorials & News:
» Python Tutorials: https://dbader.org
» Python News on Twitter: https://twitter.com/@dbader_org
» Weekly Tips for Pythonistas: https://dbader.org/newsletter
» Subscribe to this channel: https://dbader.org/youtube

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Writing automated tests for Python command-line apps and scripts», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.