adamchainz,
@adamchainz@fosstodon.org avatar

A #pytest pattern I’ve recently enjoyed using:

  1. Change some function in a way that needs fixes to call sites.
  2. Run the whole test suite with pytest.
  3. Copy the list of failing test IDs from pytest’s summary into a scratch file.
  4. Fix up the found callers.
  5. Verify everything fixed by saving the list of tests with: pytest $(cat scratch/testids.txt)

#Python #Testing

watte,
@watte@norden.social avatar

@adamchainz like --lf but without excluding successful tests the next time? Seems nice :)

adamchainz,
@adamchainz@fosstodon.org avatar

@watte Yes, and allowing partial test runs in step four whilst fixing up certain callers.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • DreamBathrooms
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • JUstTest
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • megavids
  • lostlight
  • All magazines