Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7923cd1

Browse files
committed
minor backend driver cleanup
svn path=/trunk/matplotlib/; revision=5162
1 parent 7ae7784 commit 7923cd1

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

examples/pylab/broken_barh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
fontsize=16,
2222
horizontalalignment='right', verticalalignment='top')
2323

24-
fig.savefig('broken_barh', dpi=100)
24+
#fig.savefig('broken_barh', dpi=100)
2525
show()

examples/tests/backend_driver.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def drive(backend, python=['python'], switches = []):
181181
line_lstrip = line.lstrip()
182182
if (line_lstrip.startswith('from __future__ import division') or
183183
line_lstrip.startswith('matplotlib.use') or
184-
line_lstrip.startswith('savefig') or
184+
line_lstrip.find('savefig')>=0 or
185185
line_lstrip.startswith('show')):
186186
continue
187187
tmpfile.write(line)
@@ -202,6 +202,12 @@ def drive(backend, python=['python'], switches = []):
202202
if __name__ == '__main__':
203203
times = {}
204204
default_backends = ['Agg', 'PS', 'SVG', 'PDF', 'Template']
205+
if len(sys.argv)==2 and sys.argv[1]=='--clean':
206+
for b in default_backends:
207+
# todo: implement python recursive remove
208+
os.system('rm -rf %s'%b)
209+
print 'all clean...'
210+
raise SystemExit
205211
if '--coverage' in sys.argv:
206212
python = ['coverage.py', '-x']
207213
sys.argv.remove('--coverage')

0 commit comments

Comments
 (0)