beets icon indicating copy to clipboard operation
beets copied to clipboard

WIP tests: Render ui output to HTML

Open wisp3rwind opened this issue 1 year ago • 1 comments

This is a bare-bones implementation of an idea I've had in mind for a while: Record unit test output and render it to HTML to ease development and review regarding our UI.

Does that sound like a useful tool (@davidswarbrick)? Any other thoughts?

Commit message:

experiment to help with development of the commandline user interface. The idea is to record representative output from tests, instead of needing to manually run some beet commands to get feedback. This works by

  • recording pytest output in a new tox run (tox -e py310-render_ui)
  • parsing stdout in the tox commands_post, and turning it into a basic html document with ansi2html

To be useful, a bunch of new tests should be written that showcase most of the ui and enable color. (It might also be useful to only run this script for those specific tests, instead of the entire test suite.)

wisp3rwind avatar Sep 16 '22 20:09 wisp3rwind

Wow; this is incredibly cool!! I really like this idea—it could be useful not only for tests but also for producing nice screenshots and the like.

sampsyo avatar Sep 17 '22 21:09 sampsyo