Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
housel opened this issue Jun 22, 2021 · 2 comments
Open

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

housel opened this issue Jun 22, 2021 · 2 comments

Comments

@housel
Copy link
Member

housel commented Jun 22, 2021

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
Copy link
Member Author

housel commented Oct 5, 2022

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

@cgay
Copy link
Member

cgay commented Oct 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants