File: test.py

package info (click to toggle)
django-nose 1.4.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 404 kB
  • sloc: python: 918; makefile: 207; sh: 160
file content (25 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# coding: utf-8
"""
Add extra options from the test runner to the ``test`` command.

This enables browsing all the nose options from the command line.
"""
from __future__ import unicode_literals

from django.conf import settings
from django.core.management.commands.test import Command
from django.test.utils import get_runner


TestRunner = get_runner(settings)

if hasattr(TestRunner, 'options'):
    extra_options = TestRunner.options
else:
    extra_options = []


class Command(Command):
    """Implement the ``test`` command."""

    option_list = getattr(Command, 'option_list', ()) + tuple(extra_options)