summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2018-07-02 23:54:57 +0200
committerTim Graham <timograham@gmail.com>2018-07-02 17:54:57 -0400
commiteac9ab7ebb1ce0cbbc79c4cf65e8f70b0635a240 (patch)
treeb188d9e179c1f6b0b8a250c5e1c01bab7a22d1a4 /tests
parent4009e1f2abe6268ba116dd09fbbecfc35b84f89a (diff)
downloaddjango-eac9ab7ebb1ce0cbbc79c4cf65e8f70b0635a240.tar.gz
Removed parser.add_arguments() arguments that match the defaults.
Diffstat (limited to 'tests')
-rw-r--r--tests/bash_completion/management/commands/test_command.py2
-rwxr-xr-xtests/runtests.py10
-rw-r--r--tests/test_runner/runner.py6
-rw-r--r--tests/user_commands/management/commands/hal.py2
4 files changed, 10 insertions, 10 deletions
diff --git a/tests/bash_completion/management/commands/test_command.py b/tests/bash_completion/management/commands/test_command.py
index 91ec36c2af..b2943d33ed 100644
--- a/tests/bash_completion/management/commands/test_command.py
+++ b/tests/bash_completion/management/commands/test_command.py
@@ -3,7 +3,7 @@ from django.core.management.base import BaseCommand
class Command(BaseCommand):
def add_arguments(self, parser):
- parser.add_argument("--list", action="store_true", dest="list", help="Print all options")
+ parser.add_argument("--list", action="store_true", help="Print all options")
def handle(self, *args, **options):
pass
diff --git a/tests/runtests.py b/tests/runtests.py
index 9d67a15a94..88971f43a1 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -405,11 +405,11 @@ if __name__ == "__main__":
help='Tells Django to NOT prompt the user for input of any kind.',
)
parser.add_argument(
- '--failfast', action='store_true', dest='failfast',
+ '--failfast', action='store_true',
help='Tells Django to stop running the test suite after first failed test.',
)
parser.add_argument(
- '-k', '--keepdb', action='store_true', dest='keepdb',
+ '-k', '--keepdb', action='store_true',
help='Tells Django to preserve the test database between runs.',
)
parser.add_argument(
@@ -433,15 +433,15 @@ if __name__ == "__main__":
'test side effects not apparent with normal execution lineup.',
)
parser.add_argument(
- '--selenium', dest='selenium', action=ActionSelenium, metavar='BROWSERS',
+ '--selenium', action=ActionSelenium, metavar='BROWSERS',
help='A comma-separated list of browsers to run the Selenium tests against.',
)
parser.add_argument(
- '--debug-sql', action='store_true', dest='debug_sql',
+ '--debug-sql', action='store_true',
help='Turn on the SQL query logger within tests.',
)
parser.add_argument(
- '--parallel', dest='parallel', nargs='?', default=0, type=int,
+ '--parallel', nargs='?', default=0, type=int,
const=default_test_processes(), metavar='N',
help='Run tests using up to N parallel processes.',
)
diff --git a/tests/test_runner/runner.py b/tests/test_runner/runner.py
index ac95aac403..a2c9ede897 100644
--- a/tests/test_runner/runner.py
+++ b/tests/test_runner/runner.py
@@ -12,9 +12,9 @@ class CustomOptionsTestRunner(DiscoverRunner):
@classmethod
def add_arguments(cls, parser):
- parser.add_argument('--option_a', '-a', action='store', dest='option_a', default='1'),
- parser.add_argument('--option_b', '-b', action='store', dest='option_b', default='2'),
- parser.add_argument('--option_c', '-c', action='store', dest='option_c', default='3'),
+ parser.add_argument('--option_a', '-a', default='1'),
+ parser.add_argument('--option_b', '-b', default='2'),
+ parser.add_argument('--option_c', '-c', default='3'),
def run_tests(self, test_labels, extra_tests=None, **kwargs):
print("%s:%s:%s" % (self.option_a, self.option_b, self.option_c))
diff --git a/tests/user_commands/management/commands/hal.py b/tests/user_commands/management/commands/hal.py
index 06388ab2c9..120eec961f 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', help="Do nothing.")
+ parser.add_argument('--empty', action='store_true', help="Do nothing.")
def handle(self, *app_labels, **options):
app_labels = set(app_labels)