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

Allow removing output formatter from unittest #12031

Closed
chrisheller opened this issue Aug 24, 2019 · 1 comment
Closed

Allow removing output formatter from unittest #12031

chrisheller opened this issue Aug 24, 2019 · 1 comment

Comments

@chrisheller
Copy link
Contributor

Summary

It is possible to add output formatters to unittest, but it is not possible to remove them.

Description

This is an issue for the JUnit output format (see #2088) when you have more than one test suite that are creating their own output files. Once the first suite is done and closes its output stream, the output formatter is still in the seq of formatters that is maintained inside of unittest.nim. Once the second test suite starts producing output, an exception is raised since the stream is closed.

Alternatives

Alternative implementations could include the ability to mark an OutputFormatter as no longer active, but that would require updating other code in unittest.nim to look for that flag and honor it. Being able to just remove the formatter when a suite is finished seems simpler.

@ghost
Copy link

ghost commented Oct 22, 2020

Should've been closed by #12032 - doing that now :)

@ghost ghost closed this as completed Oct 22, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant