Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть How to Test Python's Random Module

  • Pybites
  • 2023-05-23
  • 625
How to Test Python's Random Module
Pythonpytesttestingrandom moduletest automationtest strategiestest reliabilityrandom seedpredictable randomnessstandard library modulesPybitescodingsoftware developmenttest automation toolstest refactoringfixturesautouseMockaroorefactoring
  • ok logo

Скачать How to Test Python's Random Module бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно How to Test Python's Random Module или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

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

Cкачать музыку How to Test Python's Random Module бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео How to Test Python's Random Module

In this video you'll learn how to effectively test the Python random module using pytest.

We cover strategies for testing code that involves picking random emails with the random sample function (code from previous video put into functions:    • Using a bit of Python to get random emails...  )

We demonstrate the use of len() and all(), but then refactor the tests to use random.seed() to make random functions predictable, ensuring consistent results for testing.

We put random.seed() in a pytest fixture, using autouse=True to run the fixture automatically (that is, we don't pass it into the test function).

Here is an article on pytest fixtures if you're new to them: https://pybit.es/pytest-fixtures.html

A follow up video could be to refactor this test again showing how you could use mocking, just comment below if interested, as well for more Standard Library modules and testing videos ... 💡

Code:
get random emails: https://gist.github.com/bbelderbos/5d...
final tests: https://gist.github.com/bbelderbos/b9...

---
Learn more about Pybites / what we do: https://pybit.es

Get our weekly developer / mindset emails: https://pybit.es/friends/

Join our Slack community: https://pybit.es/community/

And last but not least, we appreciate any feedback to make our YouTube content better 💡
https://form.jotform.com/230941798741062 🙏

Комментарии

Информация по комментариям в разработке

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

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

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