File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22#
3+ import argparse
34import os
45import importlib .util
56
89
910
1011def _main ():
12+ parser = argparse .ArgumentParser (description = 'Refresh the reference TeX files.' )
13+ parser .add_argument ('files' , nargs = "+" , help = 'Files to refresh' )
14+ args = parser .parse_args ()
15+
1116 this_dir = os .path .dirname (os .path .abspath (__file__ ))
1217 exclude_list = ["test_rotated_labels.py" , "test_deterministic_output.py" ]
13- for filename in os .listdir (this_dir ):
18+
19+ for filename in args .files :
20+ if filename in exclude_list :
21+ continue
1422 if filename .startswith ("test_" ) and filename .endswith (".py" ):
1523 spec = importlib .util .spec_from_file_location ("plot" , filename )
16-
17- if filename in exclude_list :
18- continue
19-
2024 module = importlib .util .module_from_spec (spec )
2125 spec .loader .exec_module (module )
2226 module .plot ()
You can’t perform that action at this time.
0 commit comments