Skip to content

Commit

Permalink
Support Django 1.10 test class
Browse files Browse the repository at this point in the history
Django 1.10's test class no longer has option_list.
Fixes #254
  • Loading branch information
jwhitlock committed Jan 6, 2016
1 parent 0a9e12e commit 9ecfc4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django_nose/management/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
class Command(Command):
"""Implement the ``test`` command."""

option_list = Command.option_list + tuple(extra_options)
option_list = getattr(Command, 'option_list', ()) + tuple(extra_options)
2 changes: 1 addition & 1 deletion django_nose/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def run_tests(self, test_labels, extra_tests=None):

# Skip over 'manage.py test' and any arguments handled by django.
django_opts = self.django_opts[:]
for opt in BaseCommand.option_list:
for opt in getattr(BaseCommand, 'option_list', []):
django_opts.extend(opt._long_opts)
django_opts.extend(opt._short_opts)

Expand Down

0 comments on commit 9ecfc4d

Please sign in to comment.