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).
9
9
10
10
## Unreleased
11
11
12
+ ### Added
13
+ - Implemented [ ` reset_stdio_count() ` ] ( @ref ) to provide a public API for
14
+ resetting the stdio count ([ #1172 ] ).
15
+
12
16
### Changed
13
17
- IJulia was completely refactored to minimize global state ([ #1172 ] ). This
14
18
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
45
45
``` @docs
46
46
IJulia.readprompt
47
47
IJulia.set_max_stdio
48
+ IJulia.reset_stdio_count
48
49
```
Original file line number Diff line number Diff line change @@ -483,6 +483,15 @@ function set_max_stdio(max_output::Integer; kernel)
483
483
kernel. max_output_per_request[] = max_output
484
484
end
485
485
486
+ """
487
+ reset_stdio_count()
488
+
489
+ Reset the count of the number of bytes written to stdout/stderr. See
490
+ [`set_max_stdio`](@ref) for more details.
491
+ """
492
+ function reset_stdio_count (kernel= _default_kernel)
493
+ kernel. stdio_bytes = 0
494
+ end
486
495
487
496
# ######################################################################
488
497
Original file line number Diff line number Diff line change @@ -39,4 +39,7 @@ using IJulia
39
39
end
40
40
end
41
41
42
+ kernel. stdio_bytes = 42
43
+ IJulia. reset_stdio_count (kernel)
44
+ @test kernel. stdio_bytes == 0
42
45
end
You can’t perform that action at this time.
0 commit comments