avocado icon indicating copy to clipboard operation
avocado copied to clipboard

Introduce "avocado-classless" plugin

Open clebergnu opened this issue 1 year ago • 4 comments

The passt project wants to use avocado for tests, but we don't like its default jUnit style of test presentation. So, we plan to use some custom plugins to make test writing more approachable. Start with the implementation of the "runner" plugin. We also add some supporting pieces: an interim trivial resolver plugin and setup.py so we can actually do some stuff with that runner.

As for the resolver for the avocado-classless plugin, it requires you to give a full function name for every test you want to run. Implement a more "normal" resolver which will run all suitable tests matching a regular expression.

In the test files, tests are marked by using a decorator to put them in a special "manifest" of tests in the file.

With avocado-classless we obviously can't use the built in assertion methods from unittest / avocado-instrumented. This includes our own non-OOP helpers for this.

clebergnu avatar Nov 16 '23 20:11 clebergnu

Dear contributor, Avocado is currently under sprint #103, which is due to release an LTS (Long Term Stability) release. Please avoid merging changes that do not fall into these categories:

  • Bug fixes
  • Usability Improvements
  • Documentation updates

As for the Avocado utility modules (“avocado.utils”) it is OK to introduce new functionality, but changes to the existing APIs (including interface and behavior) should be avoided. These kind of changes should wait until sprint #104.

mr-avocado[bot] avatar Nov 16 '23 20:11 mr-avocado[bot]

@dgibson FYI, I've posted your work as an Avocado PR. I think this may be generally useful to other people/projects. Let me know your thoughts.

clebergnu avatar Nov 16 '23 22:11 clebergnu

@clebergnu ok. So, I still like the idea of doing tests without the jUnit baggage. On reflection I've had some further thoughts on exactly how to do it, and probably wouldn't do so quite like this draft of avocado-classless.

dgibson avatar Nov 17 '23 06:11 dgibson

Oh, also, now that @richtja has implemented the CORRUPT resolution result in #5787, the classless resolved should return that if it sees its shbang line, but is unable to parse the contents.

dgibson avatar Nov 17 '23 06:11 dgibson