From ca95eaf4cac3d236081727d5420053730fdb3569 Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Tue, 9 Nov 2021 15:09:05 -0500 Subject: [PATCH] Fix docs on skip compare As is, the docs on skip_compare error out when running on non notebooks files. I copied the code from the tests to the docs, which does work for me. --- docs/source/index.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/index.ipynb b/docs/source/index.ipynb index bb610ff..2e76fde 100644 --- a/docs/source/index.ipynb +++ b/docs/source/index.ipynb @@ -568,7 +568,8 @@ "outputs": [], "source": [ "def pytest_collectstart(collector):\n", - " collector.skip_compare += 'text/html', 'application/javascript', 'stderr'," + " if collector.fspath and collector.fspath.ext == '.ipynb':\n", + " collector.skip_compare += ('text/html', 'application/javascript', 'stderr')\n", ] } ],