Open bnavigator opened 3 years ago
The deprecation warning is removed by https://github.com/ipython/ipython/pull/12889, but nbval probably should not trip by that with an older ipython.
Hacky workaround:
Index: nbval-0.9.6/tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb
===================================================================
--- nbval-0.9.6.orig/tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb
+++ nbval-0.9.6/tests/ipynb-test-samples/test-latex-pass-correctouput.ipynb
@@ -37,6 +37,9 @@
}
],
"source": [
+ "import warnings\n",
+ "from matplotlib import MatplotlibDeprecationWarning\n",
+ "warnings.filterwarnings(\"ignore\", category=MatplotlibDeprecationWarning)\n",
"x**2 + y**3"
]
}
Index: nbval-0.9.6/tests/latex-example.ipynb
===================================================================
--- nbval-0.9.6.orig/tests/latex-example.ipynb
+++ nbval-0.9.6/tests/latex-example.ipynb
@@ -15,6 +15,13 @@
},
"outputs": [],
"source": [
+ "try:\n",
+ " import warnings\n",
+ " from matplotlib import MatplotlibDeprecationWarning\n",
+ " warnings.filterwarnings(\"ignore\", category=MatplotlibDeprecationWarning)\n",
+ "except ImportError:\n",
+ " # no matplotlib, no problem\n",
+ " pass\n",
"import sympy\n",
"sympy.init_printing()\n",
"x, y = sympy.symbols([\"x\", \"y\"])"
Similar to #155, a new warning message of matplotlib results in a test failure:
Testing
test-latex-pass-correctouput.ipynb
directky yields this: