nedbat,
@nedbat@hachyderm.io avatar

My test suite has just one dot on the last line. What would you do?

  • Delete one test
  • Change the width of the terminal
  • Keep it as a visceral reminder of the uncomfortably chaotic nature of the universe
  • Write more tests
slott56,
@slott56@fosstodon.org avatar

@nedbat Write a wrapper for pytest that collects the output, counts the characters. While prime, subtract an odd number greater than 1 for the last line of an overflow. When non-prime, pick two factors near the square root (one of which is more than the overflow) and make a rectangle (perhaps with an overflow line.)

I know it sounds complicated, but there are folks willing to let an LLM generate code from this.

alex,
@alex@alexwlchan.net avatar

@nedbat Switch your terminal to a proportional font

jimfl,
@jimfl@hachyderm.io avatar

@alex @nedbat Some people just want to watch the world burn

jimfawkes,

@nedbat adjust the font size

do3cc,
@do3cc@mastodon.social avatar

@nedbat write a plugin that randomly inserts whitespace, so that the last line is always full.

jimfl,
@jimfl@hachyderm.io avatar

@do3cc @nedbat How can you justify this proposal?

dabeaz,
@dabeaz@mastodon.social avatar

@nedbat Put a time.sleep(30) in that one test to just let it hang there for an uncomfortably long time.

CodenameTim,
@CodenameTim@fosstodon.org avatar

@dabeaz @nedbat That's the best idea I'll see all week 👏

billseitz,
@billseitz@toolsforthought.social avatar

@CodenameTim @dabeaz @nedbat make it a random time

dabeaz,
@dabeaz@mastodon.social avatar

@billseitz @CodenameTim @nedbat Upon reflection, this would be a pretty interesting feature to add to a terminal program (random delay for an orphaned "."). Just imagine how angry people would be when they finally figured out that the delay wasn't the test at all.

alex,
@alex@moreati.org.uk avatar

@nedbat rewrite the pytest progress indicator using braille characters, so more passing tests fit on a single line.

danzin,
@danzin@mastodon.social avatar

@nedbat That's a lot of new tests needed for a good dots feng shui. Maybe write a single new one with a loop and use the subtests fixture? Then you can detect the terminal width and scale the loop to always fill it correctly.

ojii,
@ojii@mastodon.social avatar

@nedbat write a pytest plugin that reads terminal width and auto adds noop tests to pad the number of tests to fit the terminal

bengerman,
@bengerman@hachyderm.io avatar

@nedbat turn up the verbosity so every test gets one line of output

matthiask,
@matthiask@hachyderm.io avatar

@nedbat Delete a few tests. Tests are good but test suites also accumulate cruft over time.

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