Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13b5529 commit 92f87f7Copy full SHA for 92f87f7
1 file changed
Tools/iobench/iobench.py
@@ -427,6 +427,9 @@ def main():
427
action="store", dest="newlines", default='lf',
428
help="line endings for text tests "
429
"(one of: {lf (default), cr, crlf, all})")
430
+ parser.add_option("-m", "--io-module",
431
+ action="store", dest="io_module", default=None,
432
+ help="io module to test (default: builtin open())")
433
options, args = parser.parse_args()
434
if args:
435
parser.error("unexpected arguments")
@@ -451,6 +454,9 @@ def main():
451
454
if options.encoding:
452
455
TEXT_ENCODING = options.encoding
453
456
457
+ if options.io_module:
458
+ globals()['open'] = __import__(options.io_module, {}, {}, ['open']).open
459
+
460
prepare_files()
461
run_all_tests(test_options)
462
0 commit comments