From e01e33248d71fb5555b277dcd84dc9b28b1311bd 2021-10-23 12:01:15 From: Samuel Gaist Date: 2021-10-23 12:01:15 Subject: [PATCH] [lib][tests][latextools] Remove nose --- diff --git a/IPython/lib/tests/test_latextools.py b/IPython/lib/tests/test_latextools.py index fafff73..60a7589 100644 --- a/IPython/lib/tests/test_latextools.py +++ b/IPython/lib/tests/test_latextools.py @@ -5,7 +5,6 @@ from contextlib import contextmanager from unittest.mock import patch -import nose.tools as nt import pytest from IPython.lib import latextools @@ -185,7 +184,13 @@ def test_latex_to_png_invalid_hex_colors(): Test that invalid hex colors provided to dvipng gives an exception. """ latex_string = "$x^2$" - nt.assert_raises(ValueError, lambda: latextools.latex_to_png(latex_string, - backend='dvipng', color="#f00bar")) - nt.assert_raises(ValueError, lambda: latextools.latex_to_png(latex_string, - backend='dvipng', color="#f00")) + pytest.raises( + ValueError, + lambda: latextools.latex_to_png( + latex_string, backend="dvipng", color="#f00bar" + ), + ) + pytest.raises( + ValueError, + lambda: latextools.latex_to_png(latex_string, backend="dvipng", color="#f00"), + )