Hillel Wayne - Beyond Unit Tests: Taking Your Testing to the Next Level - PyCon 2018
PyCon 20183 HN recommenders · recommended in 3 months, 2018–2023
talk · intermediate · evergreen · 2018–2023 on HN
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.
HN commenters point to it as a concise, convincing case for better testing practice short of full formal methods.
Up next
2 mo on HNRaymond Hettinger - Dataclasses: The code generator to end all code generators - PyCon 2018
PyCon 2018
2 HN recommender · 2018–2021
11 mo on HNRepublic, Lost | Lawrence Lessig | Talks at Google
Talks at Google
10 HN recommender · 2011–2017
10 mo on HNThe Coming Collapse of the Middle Class with Elizabeth Warren
University of California Television (UCTV)
10 HN recommender · 2008–2022
4 mo on HNThe surprising pattern behind color names around the world
Vox
4 HN recommender · 2017–2025
2 mo on HNAvoiding Negative Side Effects: Concrete Problems in AI Safety part 1
Robert Miles AI Safety
2 HN recommender · 2018–2023
15 mo on HNRailsConf 2014 - All the Little Things by Sandi Metz
Confreaks
15 HN recommender · 2015–2025
11 mo on HN"Testing Distributed Systems w/ Deterministic Simulation" by Will Wilson
Strange Loop Conference
12 HN recommender · 2014–2024
11 mo on HN🚀 TDD, Where Did It All Go Wrong (Ian Cooper)
DevTernity Conference
11 HN recommender · 2018–2024
11 mo on HNBret Victor - Inventing on Principle
Rui Oliveira
12 HN recommender · 2013–2025
11 mo on HNSolving Problems the Clojure Way - Rafal Dittwald
Clojure/north
10 HN recommender · 2019–2025
11 mo on HNDebugging Under Fire: Keep your Head when Systems have Lost their Mind • Bryan Cantrill • GOTO 2017
GOTO Conferences
8 HN recommender · 2018–2025
10 mo on HN"Performance Matters" by Emery Berger
Strange Loop Conference
12 HN recommender · 2019–2025
3 comments from Hacker News
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 ▶ this video
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 ▶ this 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
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: ▶ this 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.