diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2020-01-15 15:08:57 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-01-15 07:04:27 -0800 |
commit | 6b64a95713fc8a045f8e40949cec0765e0acb9b8 (patch) | |
tree | a3569486bc4e8b91ccd392549bba10d45fce59dd /test/roundtrip_tests.py | |
parent | 572557dd3ca0cedecba3833111bb04bb5668db43 (diff) |
Remove useless __name__ check in test scripts
These checks don't seem to be required and broke pathological_tests.py
on Windows where multiprocessing sets __name__ to "__mp_main__".
Diffstat (limited to 'test/roundtrip_tests.py')
-rw-r--r-- | test/roundtrip_tests.py | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/test/roundtrip_tests.py b/test/roundtrip_tests.py index a52aa8d..13444b1 100644 --- a/test/roundtrip_tests.py +++ b/test/roundtrip_tests.py @@ -4,22 +4,21 @@ from spec_tests import get_tests, do_test from cmark import CMark import argparse -if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Run cmark roundtrip tests.') - parser.add_argument('-p', '--program', dest='program', nargs='?', default=None, - help='program to test') - parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='spec.txt', - help='path to spec') - parser.add_argument('-P', '--pattern', dest='pattern', nargs='?', - default=None, help='limit to sections matching regex pattern') - parser.add_argument('--library-dir', dest='library_dir', nargs='?', - default=None, help='directory containing dynamic library') - parser.add_argument('--no-normalize', dest='normalize', - action='store_const', const=False, default=True, - help='do not normalize HTML') - parser.add_argument('-n', '--number', type=int, default=None, - help='only consider the test with the given number') - args = parser.parse_args(sys.argv[1:]) +parser = argparse.ArgumentParser(description='Run cmark roundtrip tests.') +parser.add_argument('-p', '--program', dest='program', nargs='?', default=None, + help='program to test') +parser.add_argument('-s', '--spec', dest='spec', nargs='?', default='spec.txt', + help='path to spec') +parser.add_argument('-P', '--pattern', dest='pattern', nargs='?', + default=None, help='limit to sections matching regex pattern') +parser.add_argument('--library-dir', dest='library_dir', nargs='?', + default=None, help='directory containing dynamic library') +parser.add_argument('--no-normalize', dest='normalize', + action='store_const', const=False, default=True, + help='do not normalize HTML') +parser.add_argument('-n', '--number', type=int, default=None, + help='only consider the test with the given number') +args = parser.parse_args(sys.argv[1:]) spec = sys.argv[1] |