Skip to content

Commit 4af3ab4

Browse files
committed
Create UAT.ipynb
1 parent 34652a0 commit 4af3ab4

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

test-notebooks/UAT.ipynb

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "antique-treasure",
6+
"metadata": {},
7+
"source": [
8+
"# User Automated Testing\n",
9+
"\n",
10+
"A notebook to run manually to catch issues with the backend."
11+
]
12+
},
13+
{
14+
"cell_type": "markdown",
15+
"id": "binary-speaker",
16+
"metadata": {},
17+
"source": [
18+
"# 1. Checking plt.show()\n",
19+
"\n",
20+
"The implementation of plt.show relies on the private `matplotlib._pylab_helpers.Gcf` which can break (https://github.com/matplotlib/ipympl/issues/303). The cell should run without any errors."
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": null,
26+
"id": "agricultural-whole",
27+
"metadata": {},
28+
"outputs": [],
29+
"source": [
30+
"%matplotlib ipympl\n",
31+
"import matplotlib.pyplot as plt\n",
32+
"plt.ioff()\n",
33+
"fig = plt.figure()\n",
34+
"plt.plot([0,1],[0,1])\n",
35+
"plt.show()"
36+
]
37+
},
38+
{
39+
"cell_type": "markdown",
40+
"id": "secure-consistency",
41+
"metadata": {},
42+
"source": [
43+
"# 2 plt.close()\n",
44+
"\n",
45+
"Calling `plt.close()` should prevent further interactions with the figure - so panning and resizing should no longer work after the second cell in this test."
46+
]
47+
},
48+
{
49+
"cell_type": "code",
50+
"execution_count": null,
51+
"id": "hollow-front",
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"plt.ion()\n",
56+
"plt.figure()\n",
57+
"plt.plot([0,1],[0,1])\n"
58+
]
59+
},
60+
{
61+
"cell_type": "code",
62+
"execution_count": null,
63+
"id": "classical-pavilion",
64+
"metadata": {},
65+
"outputs": [],
66+
"source": [
67+
"plt.close()"
68+
]
69+
}
70+
],
71+
"metadata": {
72+
"kernelspec": {
73+
"display_name": "Python 3",
74+
"language": "python",
75+
"name": "python3"
76+
},
77+
"language_info": {
78+
"codemirror_mode": {
79+
"name": "ipython",
80+
"version": 3
81+
},
82+
"file_extension": ".py",
83+
"mimetype": "text/x-python",
84+
"name": "python",
85+
"nbconvert_exporter": "python",
86+
"pygments_lexer": "ipython3",
87+
"version": "3.9.2"
88+
}
89+
},
90+
"nbformat": 4,
91+
"nbformat_minor": 5
92+
}

0 commit comments

Comments
 (0)