Skip to content

Use IOCapture to silence tests.#25

Merged
maleadt merged 1 commit into
mainfrom
tb/iocapture
Oct 12, 2025
Merged

Use IOCapture to silence tests.#25
maleadt merged 1 commit into
mainfrom
tb/iocapture

Conversation

@maleadt

@maleadt maleadt commented Oct 12, 2025

Copy link
Copy Markdown
Collaborator

The test output of this package is now simply:

     Testing Running tests...

Showing the output of one test run:
--------------------------------------------------------------------------------
[ Info: Running 1 tests in parallel. If this is too many, specify the `--jobs=N` argument to the tests, or set the `JULIA_CPU_THREADS` environment variable.
               |          | ---------------- CPU ---------------- |
Test  (Worker) | Time (s) |  GC (s) | GC % | Alloc (MB) | RSS (MB) |
basic      (2) |        started at 2025-10-12T08:58:41.233
basic      (2) |     0.03 |   0.00 |  0.0 |       2.13 |   373.42 |

Test Summary: | Pass  Total  Time
  Overall     |    1      1  2.3s
    SUCCESS
--------------------------------------------------------------------------------

Test Summary:                | Pass  Total   Time
ParallelTestRunner           |   21     21  37.8s
  basic test                 |    2      2   8.7s
  custom tests and init code |    3      3   5.1s
  custom worker              |    4      4  10.2s
  failing test               |    6      6   7.4s
  throwing test              |    6      6   6.4s
     Testing ParallelTestRunner tests passed 

Comment thread test/runtests.jl
using Test
using Test, IOCapture

pushfirst!(ARGS, "--verbose")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtests mutates ARGS so this only affected the first invocation.

@maleadt maleadt merged commit 08e8a0a into main Oct 12, 2025
20 checks passed
@maleadt maleadt deleted the tb/iocapture branch October 12, 2025 07:07
@giordano

giordano commented Oct 12, 2025

Copy link
Copy Markdown
Collaborator

If a test fails not intentionally do we see the output? Edit: I guess so, this PR handles specially only how tests for this package are run and displayed.

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

Successfully merging this pull request may close these issues.

2 participants