From 392221e7f3bdf52e37a639b7bc0d1a38dbcf6be6 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Thu, 1 Sep 2022 15:57:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Fix=20tests=20for=20new=20depend?= =?UTF-8?q?ency=20versions=20(#439)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 6 +++--- tests/test_execute.py | 15 +++------------ .../test_complex_outputs_unrun_auto.ipynb | 16 +++++++++------- .../test_complex_outputs_unrun_cache.ipynb | 16 +++++++++------- tests/test_execute/test_custom_convert_auto.xml | 2 +- tests/test_execute/test_custom_convert_cache.xml | 2 +- 6 files changed, 26 insertions(+), 31 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 527eab95..89570c9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,9 +92,9 @@ testing = [ "beautifulsoup4", "ipykernel~=5.5", "ipython!=8.1.0", # see https://github.com/ipython/ipython/issues/13554 - "ipywidgets", + "ipywidgets>=8", "jupytext~=1.11.2", - "matplotlib", + "matplotlib>=3.5.3", "nbdime", "numpy", "pandas", @@ -102,7 +102,7 @@ testing = [ "pytest-cov~=3.0", "pytest-regressions", "pytest-param-files~=0.3.3", - "sympy", + "sympy>=1.10.1", ] [project.scripts] diff --git a/tests/test_execute.py b/tests/test_execute.py index 50915435..80704ac8 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -18,24 +18,15 @@ def regress_nb_doc(file_regression, sphinx_run, check_nbs): doctree_string = sphinx_run.get_doctree().pformat() # TODO this is a difference in the hashing on the CI, # with complex_outputs_unrun.ipynb equation PNG, after execution + # sympy doctree_string = doctree_string.replace( - "438c56ea3dcf99d86cd64df1b23e2b436afb25846434efb1cfec7b660ef01127", - "e2dfbe330154316cfb6f3186e8f57fc4df8aee03b0303ed1345fc22cd51f66de", - ) - doctree_string = doctree_string.replace( - "ba12df2746ada2238753ff8514da1431501f9de0fbf63eacda13f6e8c3e799c4", + "91b3db0f47514d451e7c0f5a501d31c4e101b7112050634ad0788405f417782a", "e2dfbe330154316cfb6f3186e8f57fc4df8aee03b0303ed1345fc22cd51f66de", ) - # sympy python > 3.7 doctree_string = doctree_string.replace( - "22b9ad367066892ac151e00c2cf0d7e815327649772d7623d80606baf78307cc", + "438c56ea3dcf99d86cd64df1b23e2b436afb25846434efb1cfec7b660ef01127", "e2dfbe330154316cfb6f3186e8f57fc4df8aee03b0303ed1345fc22cd51f66de", ) - # change in matplotlib > 3.3 - doctree_string = doctree_string.replace( - "1716e562622b606c639ae411adceadd2bdbbaaae765ca9e118500612099a4821", - "cc1d31550c7aaad5128f57d4f4cae576a29174f6cd515e37c0b911f6010659f3", - ) if os.name == "nt": # on Windows image file paths are absolute doctree_string = doctree_string.replace( Path(sphinx_run.app.srcdir).as_posix() + "/", "" diff --git a/tests/test_execute/test_complex_outputs_unrun_auto.ipynb b/tests/test_execute/test_complex_outputs_unrun_auto.ipynb index 9dc27843..9441a323 100644 --- a/tests/test_execute/test_complex_outputs_unrun_auto.ipynb +++ b/tests/test_execute/test_complex_outputs_unrun_auto.ipynb @@ -452,8 +452,9 @@ "Layout()" ] }, + "execution_count": 6, "metadata": {}, - "output_type": "display_data" + "output_type": "execute_result" } ], "source": [ @@ -622,20 +623,23 @@ "state": { "1337h4x0R": { "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", + "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", + "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", + "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, - "border": null, + "border_bottom": null, + "border_left": null, + "border_right": null, + "border_top": null, "bottom": null, "display": null, "flex": null, @@ -663,8 +667,6 @@ "object_position": null, "order": null, "overflow": null, - "overflow_x": null, - "overflow_y": null, "padding": null, "right": null, "top": null, diff --git a/tests/test_execute/test_complex_outputs_unrun_cache.ipynb b/tests/test_execute/test_complex_outputs_unrun_cache.ipynb index 9dc27843..9441a323 100644 --- a/tests/test_execute/test_complex_outputs_unrun_cache.ipynb +++ b/tests/test_execute/test_complex_outputs_unrun_cache.ipynb @@ -452,8 +452,9 @@ "Layout()" ] }, + "execution_count": 6, "metadata": {}, - "output_type": "display_data" + "output_type": "execute_result" } ], "source": [ @@ -622,20 +623,23 @@ "state": { "1337h4x0R": { "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", + "model_module_version": "2.0.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", + "_model_module_version": "2.0.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", + "_view_module_version": "2.0.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, - "border": null, + "border_bottom": null, + "border_left": null, + "border_right": null, + "border_top": null, "bottom": null, "display": null, "flex": null, @@ -663,8 +667,6 @@ "object_position": null, "order": null, "overflow": null, - "overflow_x": null, - "overflow_y": null, "padding": null, "right": null, "top": null, diff --git a/tests/test_execute/test_custom_convert_auto.xml b/tests/test_execute/test_custom_convert_auto.xml index c0ca87d3..cc845939 100644 --- a/tests/test_execute/test_custom_convert_auto.xml +++ b/tests/test_execute/test_custom_convert_auto.xml @@ -18,4 +18,4 @@
- + diff --git a/tests/test_execute/test_custom_convert_cache.xml b/tests/test_execute/test_custom_convert_cache.xml index c0ca87d3..cc845939 100644 --- a/tests/test_execute/test_custom_convert_cache.xml +++ b/tests/test_execute/test_custom_convert_cache.xml @@ -18,4 +18,4 @@
- +