Skip to content

Commit

Permalink
🧪 Fix tests for new dependency versions (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Sep 1, 2022
1 parent 23385c2 commit 392221e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 31 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ testing = [
"beautifulsoup4",
"ipykernel~=5.5",
"ipython!=8.1.0", # see https:/ipython/ipython/issues/13554
"ipywidgets",
"ipywidgets>=8",
"jupytext~=1.11.2",
"matplotlib",
"matplotlib>=3.5.3",
"nbdime",
"numpy",
"pandas",
"pytest~=7.1",
"pytest-cov~=3.0",
"pytest-regressions",
"pytest-param-files~=0.3.3",
"sympy",
"sympy>=1.10.1",
]

[project.scripts]
Expand Down
15 changes: 3 additions & 12 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() + "/", ""
Expand Down
16 changes: 9 additions & 7 deletions tests/test_execute/test_complex_outputs_unrun_auto.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@
"Layout()"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -663,8 +667,6 @@
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
Expand Down
16 changes: 9 additions & 7 deletions tests/test_execute/test_complex_outputs_unrun_cache.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@
"Layout()"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -663,8 +667,6 @@
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_execute/test_custom_convert_auto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<literal_block classes="output text_plain" language="myst-ansi" xml:space="preserve">
<Figure size 432x288 with 1 Axes>
<container mime_type="image/png">
<image candidates="{'*': '_build/jupyter_execute/cc1d31550c7aaad5128f57d4f4cae576a29174f6cd515e37c0b911f6010659f3.png'}" uri="_build/jupyter_execute/cc1d31550c7aaad5128f57d4f4cae576a29174f6cd515e37c0b911f6010659f3.png">
<image candidates="{'*': '_build/jupyter_execute/6ec0bc0f7a271e936c19e401605eb0c5c3b463c2d0ece66fbf9eb22aba8e2a49.png'}" uri="_build/jupyter_execute/6ec0bc0f7a271e936c19e401605eb0c5c3b463c2d0ece66fbf9eb22aba8e2a49.png">
2 changes: 1 addition & 1 deletion tests/test_execute/test_custom_convert_cache.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<literal_block classes="output text_plain" language="myst-ansi" xml:space="preserve">
<Figure size 432x288 with 1 Axes>
<container mime_type="image/png">
<image candidates="{'*': '_build/jupyter_execute/cc1d31550c7aaad5128f57d4f4cae576a29174f6cd515e37c0b911f6010659f3.png'}" uri="_build/jupyter_execute/cc1d31550c7aaad5128f57d4f4cae576a29174f6cd515e37c0b911f6010659f3.png">
<image candidates="{'*': '_build/jupyter_execute/6ec0bc0f7a271e936c19e401605eb0c5c3b463c2d0ece66fbf9eb22aba8e2a49.png'}" uri="_build/jupyter_execute/6ec0bc0f7a271e936c19e401605eb0c5c3b463c2d0ece66fbf9eb22aba8e2a49.png">

0 comments on commit 392221e

Please sign in to comment.