dylan-lang / testworks

Test framework for Dylan
http://dylan-lang.github.io/testworks/
5 stars 5 forks source link

Suite setup functions are not run when invoking tests with --test #148

Open housel opened 3 years ago

housel commented 3 years ago

When the --test command-line option is used to invoke a particular test, the setup-function and cleanup-function of the suite to which it (transitively) belongs are not called.

housel commented 2 years ago

Also, there are no unit tests for suite-setup-function and suite-cleanup-function.

cgay commented 2 years ago

It's no secret I've been trying to reduce the need for suites, but this strikes me as the one truly useful thing about them: giving a collection of tests a shared setup/teardown. We should

  1. fix the above problem
  2. explicitly document the use of suites for shared setup/teardown
  3. make sure there's no warning for suites that aren't used or exported
  4. make sure the current auto-generated suite includes the explicit suite rather than directly including the tests it contains. (I think this works but need to verify.)

To be explicit, it should be possible to define a suite with setup/teardown, plus a bunch of top-level tests, not include the suite in any parent suite, and the right thing should happen.