Skip to content

Commit c94d477

Browse files
committed
Hide spurious stderr output in notebook_cmd_test.py
1 parent 4cdd703 commit c94d477

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage/cli/notebook_cmd_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ def test_jupyterlab_explicitly():
2626
assert args.notebook == "jupyterlab"
2727

2828

29-
def test_invalid_notebook_choice():
29+
def test_invalid_notebook_choice(capsys):
3030
parser = argparse.ArgumentParser()
3131
JupyterNotebookCmd.extend_parser(parser)
3232
with pytest.raises(SystemExit):
3333
parser.parse_args(["--notebook", "invalid"])
34+
assert "argument -n/--notebook: invalid choice: 'invalid'" in capsys.readouterr()[1]
3435

3536

3637
def test_help():

0 commit comments

Comments
 (0)