Show More
@@ -133,7 +133,7 b' def parselistfiles(files, listtype, warn' | |||||
133 | f.close() |
|
133 | f.close() | |
134 | return entries |
|
134 | return entries | |
135 |
|
135 | |||
136 | def parseargs(): |
|
136 | def parseargs(args): | |
137 | parser = optparse.OptionParser("%prog [options] [tests]") |
|
137 | parser = optparse.OptionParser("%prog [options] [tests]") | |
138 |
|
138 | |||
139 | # keep these sorted |
|
139 | # keep these sorted | |
@@ -210,7 +210,7 b' def parseargs():' | |||||
210 | for option, (envvar, default) in defaults.items(): |
|
210 | for option, (envvar, default) in defaults.items(): | |
211 | defaults[option] = type(default)(os.environ.get(envvar, default)) |
|
211 | defaults[option] = type(default)(os.environ.get(envvar, default)) | |
212 | parser.set_defaults(**defaults) |
|
212 | parser.set_defaults(**defaults) | |
213 | (options, args) = parser.parse_args() |
|
213 | (options, args) = parser.parse_args(args) | |
214 |
|
214 | |||
215 | # jython is always pure |
|
215 | # jython is always pure | |
216 | if 'java' in sys.platform or '__pypy__' in sys.modules: |
|
216 | if 'java' in sys.platform or '__pypy__' in sys.modules: | |
@@ -1176,8 +1176,8 b' def runtests(options, tests):' | |||||
1176 | testtypes = [('.py', pytest, '.out'), |
|
1176 | testtypes = [('.py', pytest, '.out'), | |
1177 | ('.t', tsttest, '')] |
|
1177 | ('.t', tsttest, '')] | |
1178 |
|
1178 | |||
1179 | def main(): |
|
1179 | def main(args): | |
1180 | (options, args) = parseargs() |
|
1180 | (options, args) = parseargs(args) | |
1181 | os.umask(022) |
|
1181 | os.umask(022) | |
1182 |
|
1182 | |||
1183 | checktools() |
|
1183 | checktools() | |
@@ -1299,4 +1299,4 b' def main():' | |||||
1299 | cleanup(options) |
|
1299 | cleanup(options) | |
1300 |
|
1300 | |||
1301 | if __name__ == '__main__': |
|
1301 | if __name__ == '__main__': | |
1302 | main() |
|
1302 | main(sys.argv[1:]) |
General Comments 0
You need to be logged in to leave comments.
Login now