django-nose
django-nose copied to clipboard
Options passed to django.core.management.call_command are ignored when the test command is executed programmatically
STR
- Open django shell:
./manage.py shell
- 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