veronica,
@veronica@mastodon.online avatar

At this point, test coverage has become a matter of pride and principle on my personal project.

This patch is a big one too. +1,112 −485 lines. 😊

brianokken,
@brianokken@fosstodon.org avatar

@veronica what are you using for these visualizations?

veronica, (edited )
@veronica@mastodon.online avatar

@brianokken I have Codecov integrated into my GitHub actions: https://app.codecov.io/gh/vkbo/novelWriter/pull/1606

Locally, I use pytest-cov to generate HTML and XML coverage reports, and the Coverage Gutters VSCode extensions to visualise line-by-line coverage directly in the source code. The latter is perfect for finding those single uncovered lines.

brianokken,
@brianokken@fosstodon.org avatar

@veronica thanks

veronica,
@veronica@mastodon.online avatar

There are now ~22000 lines of tests for ~35000 lines of code.

sbi,
@sbi@toot.berlin avatar

@veronica That sounds like extraordinary well-structured test code. IME, test code tends to be way more repetitive, and thus way more extensive, than production code.

veronica,
@veronica@mastodon.online avatar

@sbi Well, it's a Qt GUI app, and I build the GUI in the code (not via the GUI builder). That code is tested "for free" when the GUI is opened as pretty much all of that happens in class initialisation, or is called from init. So I don't need to write explicit tests for that, There's generally no branching in those bits.

veronica,
@veronica@mastodon.online avatar

@sbi That said, I do avoid repetition in my test code. I tend to write larger tests because setup and teardown is expensive, and I use a lot of fixtures and util functions to create the test environment.

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