File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ Changelog](https://keepachangelog.com).
99
1010## Unreleased
1111
12+ ### Added
13+ - Implemented [ ` reset_stdio_count() ` ] ( @ref ) to provide a public API for
14+ resetting the stdio count ([ #1145 ] ).
15+
1216### Changed
1317- IJulia was completely refactored to minimize global state ([ #1145 ] ). This
1418 allows for better testing (for the first time we can test kernel execution)
Original file line number Diff line number Diff line change @@ -45,4 +45,5 @@ IJulia.load_string
4545``` @docs
4646IJulia.readprompt
4747IJulia.set_max_stdio
48+ IJulia.reset_stdio_count
4849```
Original file line number Diff line number Diff line change @@ -485,6 +485,15 @@ function set_max_stdio(max_output::Integer; kernel)
485485 kernel. max_output_per_request[] = max_output
486486end
487487
488+ """
489+ reset_stdio_count()
490+
491+ Reset the count of the number of bytes written to stdout/stderr. See
492+ [`set_max_stdio`](@ref) for more details.
493+ """
494+ function reset_stdio_count (kernel= _default_kernel)
495+ kernel. stdio_bytes = 0
496+ end
488497
489498# ######################################################################
490499
Original file line number Diff line number Diff line change @@ -39,4 +39,7 @@ using IJulia
3939 end
4040 end
4141
42+ kernel. stdio_bytes = 42
43+ IJulia. reset_stdio_count (kernel)
44+ @test kernel. stdio_bytes == 0
4245end
You can’t perform that action at this time.
0 commit comments