[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65644] jupyter-notebook tests fail if a figur
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #65644] jupyter-notebook tests fail if a figure is already open |
Date: |
Thu, 25 Apr 2024 22:57:57 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?65644>
Summary: jupyter-notebook tests fail if a figure is already
open
Group: GNU Octave
Submitter: nrjank
Submitted: Thu 25 Apr 2024 10:57:57 PM EDT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 25 Apr 2024 10:57:57 PM EDT By: Nicholas Jankowski <nrjank>
as noticed over on bug #65641 when a test accidentally left a figure window up
during the test suite, that window being present caused a jupyter-notebook
test to fail. This can be verified with just testing jupyter-notebook.
with no figures open:
close all
test jupyter-notebook.tst
PASSES 4 out of 4 tests
close all
figure
test jupyter-notebook.tst
***** testif HAVE_RAPIDJSON
visibility = get (0, "defaultfigurevisible");
toolkit = graphics_toolkit ();
unwind_protect
if (! strcmp (graphics_toolkit (), "qt"))
try
graphics_toolkit ("gnuplot");
catch
## The system doesn't support gnuplot for drawing hidden
## figures. Just return and have test marked as passing.
return;
end_try_catch
endif
set (0, "defaultfigurevisible", "off");
n = jupyter_notebook (fullfile ("octave_kernel.ipynb"));
n.run_all ();
## Test embedding images
assert (n.notebook.cells{3}.outputs{1}.output_type, "display_data")
assert (isfield (n.notebook.cells{3}.outputs{1}.data, "image/png"));
assert (getfield (n.notebook.cells{3}.outputs{1}.data, "text/plain"),
{"<IPython.core.display.Image object>"});
## Test running non-code cells
markdown_cell = n.notebook.cells{1};
n.run (1);
assert (markdown_cell, n.notebook.cells{1});
## Test embedding textual output
assert (n.notebook.cells{6}.outputs{1}.output_type, "stream")
assert (n.notebook.cells{6}.outputs{1}.name, "stdout");
unwind_protect_cleanup
set (0, "defaultfigurevisible", visibility);
graphics_toolkit (toolkit);
end_unwind_protect
!!!!! test failed
get: invalid handle (= 2)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65644>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65644] jupyter-notebook tests fail if a figure is already open,
Nicholas Jankowski <=