6
6
7
7
from __future__ import division
8
8
import os , time , sys
9
+ import matplotlib .backends as mplbe
10
+
9
11
files = (
10
12
'alignment_test.py' ,
11
13
'arctest.py' ,
30
32
'image_demo.py' ,
31
33
'image_demo2.py' ,
32
34
'image_demo_na.py' ,
35
+ 'image_masked.py' ,
33
36
'image_origin.py' ,
34
37
'invert_axes.py' ,
35
38
'layer_images.py' ,
74
77
)
75
78
76
79
77
- #tests known to fail on python22 (require datetime)
78
- fail22 = (
79
- 'date_demo1.py' ,
80
- 'date_demo2.py' ,
81
- 'finance_demo.py' ,
82
- )
83
-
84
-
85
80
# tests known to fail on a given backend
86
81
87
82
failbackend = dict (
@@ -118,7 +113,7 @@ def drive(backend, python='python', switches = []):
118
113
line_lstrip .startswith ('show' )):
119
114
continue
120
115
tmpfile .write (line )
121
- if backend in ( 'GTK' , 'WX' , 'TkAgg' ) :
116
+ if backend in mplbe . interactive_bk :
122
117
tmpfile .write ('show()' )
123
118
else :
124
119
tmpfile .write ('savefig("%s", dpi=150)' % outfile )
@@ -130,19 +125,15 @@ def drive(backend, python='python', switches = []):
130
125
131
126
if __name__ == '__main__' :
132
127
times = {}
133
- # backends = ['Agg', 'Cairo', 'GDK', 'PS', 'SVG', 'Template']
134
- #backends = ['Agg', 'PS', 'SVG', 'Template']
135
- # backends = [ 'GTK', 'WX', 'TkAgg']
136
128
default_backends = ['Agg' , 'PS' , 'SVG' , 'Template' ]
137
- #default_backends = ['Agg']
138
- #backends = ['Agg']
139
129
if sys .platform == 'win32' :
140
130
python = r'c:\Python24\python.exe'
141
131
else :
142
132
python = 'python'
133
+ backends = []
143
134
switches = []
144
135
if sys .argv [1 :]:
145
- backends = [b for b in sys .argv [1 :] if b in default_backends ]
136
+ backends = [b for b in sys .argv [1 :] if b in mplbe . all_backends ]
146
137
switches = [s for s in sys .argv [1 :] if s .startswith ('--' )]
147
138
if not backends :
148
139
backends = default_backends
0 commit comments