Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

How To Write Unit Tests For Existing Python Code // Part 1 of 2

Автор: ArjanCodes

Загружено: 2022-05-20

Просмотров: 227714

Описание:

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide.

In this video, I show you a practical example of adding unit tests to existing code. This first part focuses on adding tests while not changing the original code. In the second part (coming out next week), I'll show how refactoring the code simplifies test writing while also improving the design.

NOTES:

1) There are a few things in the test setup that are not ideal, like how dates are used in the test code, using a real API key, and doing actual card charges. I'll address these things in part 2.

2) patching means that you're replacing a dependency in a function or method with something else. The thing that you replace it with is called a mock (apologies, my use of the terms in the video is a bit messy).

The code I worked on in this episode is available here: https://github.com/ArjanCodes/2022-te....

🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/

🔖 Chapters:
0:00 Intro
1:05 Explaining the example
4:10 Analysis & Setup
6:05 Adding LineItem tests
8:40 Adding Order tests
10:56 Adding PaymentProcessor tests
15:50 Analysis of the test setup so far
17:05 Adding pay_order tests

#arjancodes #softwaredesign #python

How To Write Unit Tests For Existing Python Code // Part 1 of 2

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

How To Write Unit Tests For Existing Python Code // Part 2 of 2

How To Write Unit Tests For Existing Python Code // Part 2 of 2

How to Write Great Unit Tests in Python

How to Write Great Unit Tests in Python

Почему ваш код не соответствует Python (и как это исправить)

Почему ваш код не соответствует Python (и как это исправить)

Thoughts About Unit Testing | Prime Reacts

Thoughts About Unit Testing | Prime Reacts

7 Python Code Smells to AVOID at All Costs

7 Python Code Smells to AVOID at All Costs

Zrozum testy jednostkowe i asercje 🧐 Python 🐍 Pytest 🤖

Zrozum testy jednostkowe i asercje 🧐 Python 🐍 Pytest 🤖

Хватит всё жестко кодировать: используйте внедрение зависимостей

Хватит всё жестко кодировать: используйте внедрение зависимостей

Как писать модульные тесты (правильный способ)

Как писать модульные тесты (правильный способ)

Почему Азовское море — самое опасное в мире

Почему Азовское море — самое опасное в мире

The Ultimate Guide to Writing Classes in Python

The Ultimate Guide to Writing Classes in Python

Декораторы Python — наглядное объяснение

Декораторы Python — наглядное объяснение

Please Learn How To Write Tests in Python… • Pytest Tutorial

Please Learn How To Write Tests in Python… • Pytest Tutorial

Dependency INVERSION vs Dependency INJECTION in Python

Dependency INVERSION vs Dependency INJECTION in Python

Please Master This MAGIC Python Feature... 🪄

Please Master This MAGIC Python Feature... 🪄

Забудь VS Code — Вот Почему Все Переходят на Cursor AI

Забудь VS Code — Вот Почему Все Переходят на Cursor AI

NotebookLM: Таблицы из всего. 4 Способа применения

NotebookLM: Таблицы из всего. 4 Способа применения

Фатальная ошибка немецкого флота

Фатальная ошибка немецкого флота

The Ultimate Guide to Writing Functions

The Ultimate Guide to Writing Functions

Automated Testing in Python with pytest, tox, and GitHub Actions

Automated Testing in Python with pytest, tox, and GitHub Actions

ООП На Простых Примерах | Объектно-Ориентированное Программирование

ООП На Простых Примерах | Объектно-Ориентированное Программирование

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]