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 @@ -485,6 +485,15 @@ function set_max_stdio(max_output::Integer; kernel)
485
485
kernel. max_output_per_request[] = max_output
486
486
end
487
487
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
488
497
489
498
# ######################################################################
490
499
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