HackerTube.dev

Hillel Wayne - Beyond Unit Tests: Taking Your Testing to the Next Level - PyCon 2018

PyCon 2018 · 38.1K views · 2018-05-12 · 29:21

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

Hillel Wayne's PyCon 2018 talk on testing beyond pytest and mypy. It introduces property-based testing with the Hypothesis library and design-by-contract with dpcontracts, and shows how to combine them with an existing test suite.

On Hacker News

HN commenters point to it as a concise, convincing case for better testing practice short of full formal methods.

Recommended by 3 HN people across 3 months · HN mentions 2018–2023

Topics

Search by tags

What people said

jononor · 2019-04 · Strong recommendation

I found this talk (by the same person being interviewed) to be concise and convincing on how to do better than typical practice, without going to full formal methods. Hillel Wayne - Beyond Unit Tests: Taking Your Testing to the Next Level - PyCon 2018 [VIDEO]

Read the original HN comment ↗
spion · 2023-01 · Recommendation

Most of the non-joyful experience of writing tests lies in the context preparation, not so much in the expected outputs. I think we need a modern version of design by contract instead. Its one of the most powerful techniques of testing software is unfortunately often ignored and overlooked these days... Some less known things about design by contract: - you can easily test way more than types in preconditions and postconditions - extreme web controller postcondition example: every time there is a 200 response to a POST /new request, there should be at least one document more in storage than there was before the request. (caveat: unless there are deletes - then sum the deletes up too) - things important to the business look a ton like contracts - e.g. a diff of two legal documents always contains the full content (list of words) of both documents (never accidentally swallow content!) - your postconditions can surprisingly often fully describe the desired function behavior - with sufficient amount of pre and postconditions, your property tests look like "exercise the module or entire system with random actions" -> unit and integration tests (see Hilel Wayne's excellent video on this topic [VIDEO] ) Some things that could really help modernize design by contract - Test at a certain sampling rate in production for expensive contracts (do not turn them off) - Report contract violations via observability mechanisms (tracing, sentry etc) - Better language support for contract DSLs

Read the original HN comment ↗
sn9 · 2018-12 · Recommendation

Some of my favorite talks from Strange Loop: * Contracts For Getting More Programs Less Wrong: [LINK] * "It's Just Matrix Multiplication": Notation for Weaving: [LINK] * Hackett: a metaprogrammable Haskell: [LINK] * Git from the Ground Up: [LINK] From PyCon: * Beyond Unit Tests: Taking Your Testing to the Next Level: [VIDEO] * Dataclasses: The code generator to end all code generator: [LINK] * Automating Code Quality: [LINK] There are probably more I might add later as I remember them.

Read the original HN comment ↗

Sources

Video by PyCon 2018, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources