File tree 1 file changed +17
-1
lines changed 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ import argparse
1
2
import sys
2
3
3
4
import matplotlib as mpl
4
5
import mpl_gui as mg
5
6
from matplotlib .figure import Figure
6
7
8
+ # ensure no pyplot!
7
9
assert sys .modules .get ("matplotlib.pyplot" , None ) is None
8
10
sys .modules ["matplotlib.pyplot" ] = None
9
11
12
+ parser = argparse .ArgumentParser (
13
+ description = "User Acceptance Tests for mpl-gui." ,
14
+ epilog = (
15
+ "This script runs through several scenarios and prints out prompts explaining the expected behavior. "
16
+ "The figures will need to be closed to continue the script. "
17
+ ),
18
+ )
19
+ parser .add_argument (
20
+ "backend" ,
21
+ type = str ,
22
+ help = "The backend to use. Can be anything that `mpl.use` accepts" ,
23
+ )
24
+
25
+ args = parser .parse_args ()
26
+ target = args .backend
10
27
11
- _ , target = sys .argv
12
28
13
29
# this is how to force the right Qt binding
14
30
if target .lower ().startswith ("qt5" ):
You can’t perform that action at this time.
0 commit comments