diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-04-01 17:03:56 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-04-01 20:03:56 -0400 |
| commit | 7bbb5161eaad6771676281c5c544030cf9ff1312 (patch) | |
| tree | 1c24314c1af0cc0c2503909f78e5beaa363921c4 /tests | |
| parent | 1aa8e8605cca95b31eaf6f5e47bc0742d6f2e0c7 (diff) | |
Removed implicit default store_true/false argparse args.
argparse automatically sets the default value for store_true/false
arguments to its opposite.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/runtests.py | 10 | ||||
| -rw-r--r-- | tests/user_commands/management/commands/hal.py | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index 226ae96ca7..cf07aef856 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -388,15 +388,15 @@ if __name__ == "__main__": help='Verbosity level; 0=minimal output, 1=normal output, 2=all output', ) parser.add_argument( - '--noinput', action='store_false', dest='interactive', default=True, + '--noinput', action='store_false', dest='interactive', help='Tells Django to NOT prompt the user for input of any kind.', ) parser.add_argument( - '--failfast', action='store_true', dest='failfast', default=False, + '--failfast', action='store_true', dest='failfast', help='Tells Django to stop running the test suite after first failed test.', ) parser.add_argument( - '-k', '--keepdb', action='store_true', dest='keepdb', default=False, + '-k', '--keepdb', action='store_true', dest='keepdb', help='Tells Django to preserve the test database between runs.', ) parser.add_argument( @@ -415,7 +415,7 @@ if __name__ == "__main__": help='Run the test suite in pairs with the named test to find problem pairs.', ) parser.add_argument( - '--reverse', action='store_true', default=False, + '--reverse', action='store_true', help='Sort test suites and test cases in opposite order to debug ' 'test side effects not apparent with normal execution lineup.', ) @@ -424,7 +424,7 @@ if __name__ == "__main__": help='A comma-separated list of browsers to run the Selenium tests against.', ) parser.add_argument( - '--debug-sql', action='store_true', dest='debug_sql', default=False, + '--debug-sql', action='store_true', dest='debug_sql', help='Turn on the SQL query logger within tests.', ) parser.add_argument( diff --git a/tests/user_commands/management/commands/hal.py b/tests/user_commands/management/commands/hal.py index 055f441ab4..06388ab2c9 100644 --- a/tests/user_commands/management/commands/hal.py +++ b/tests/user_commands/management/commands/hal.py @@ -6,7 +6,7 @@ class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', metavar='app_label', nargs='*', help='Specify the app label(s) to works on.') - parser.add_argument('--empty', action='store_true', dest='empty', default=False, help="Do nothing.") + parser.add_argument('--empty', action='store_true', dest='empty', help="Do nothing.") def handle(self, *app_labels, **options): app_labels = set(app_labels) |
