File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1+ import argparse
12import sys
23
34import matplotlib as mpl
45import mpl_gui as mg
56from matplotlib .figure import Figure
67
8+ # ensure no pyplot!
79assert sys .modules .get ("matplotlib.pyplot" , None ) is None
810sys .modules ["matplotlib.pyplot" ] = None
911
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
1027
11- _ , target = sys .argv
1228
1329# this is how to force the right Qt binding
1430if target .lower ().startswith ("qt5" ):
You can’t perform that action at this time.
0 commit comments