My Python testing style guide – Stargirl (Thea) Flowers

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • pytest-describe

    Describe-style plugin for the pytest framework

  • I've found pytest to encourage tests with really long method names, examples from the post:

    * test_refresh_failure

    * test_refresh_with_timeout

    These get even longer like test_refresh_with_timeout_when_username_is_not_found for example.

    pytest-describe allows for a much nicer testing syntax. There's a great comparison here: https://github.com/pytest-dev/pytest-describe#why-bother

    TL;DR, this is nicer:

    def describe_my_function():

        def with_default_arguments():

  • VCR.py

    Automatically mock your HTTP interactions to simplify and speed up testing

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts