django-nose icon indicating copy to clipboard operation
django-nose copied to clipboard

Options passed to django.core.management.call_command are ignored when the test command is executed programmatically

Open sjakthol opened this issue 9 years ago • 0 comments

STR

  1. Open django shell: ./manage.py shell
  2. Execute the following commands:
from django.core.management import call_command
call_command("test", version=True)

What happens

The test command executes nosetests --verbosity=1 and ignores the version parameter passed to call_command.

What should happen

The test command should print the version and exit.

Additional information

The problem seems to be that django-nose always reads the arguments from sys.argv (code). However, the options passed to call_command are forwarded to the test runner constructor instead (code) and are not present is sys.argv.

Configuration

  • Django v1.9.1
  • django-nose v1.4.3
  • nose v1.3.7

sjakthol avatar Jan 19 '16 12:01 sjakthol