Tuesday, March 27, 2012

Re: Upgrading to 1.4, now a test is skipped?

On 28/03/2012, at 2:02 AM, Tim Chase wrote:

> I'm in the process of upgrading from 1.3 to 1.4, and noticed that my test results now say that one of the tests is being skipped. As best I can tell, this is an internal Django test, rather than one of mine. Since it's not an actual failure, I'm mostly curious about what it is and what triggers it (perhaps having something to do with my dev machine sqlite vs. some other DB backend?).
>
> Any way to tell "./manage.py test" to be verbose, or to track down the origin of the test that's skipped?

$ ./manage.py test --help
Usage: ./manage.py test [options] [appname ...]

Runs the test suite for the specified applications, or the entire site if no apps are specified.

Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output,
2=all output
...

Yup. :-)

It's -v 2 that you're looking for; look for lines containing "... skipped"; this will then be followed by the reason for the skip. For example, if you don't have markup libraries installed, the contrib.markup tests will return:

(lots of test setup noise)
...
Creating table transfield_credentials
Installing custom SQL ...
Installing indexes ...
No fixtures found.
test_docutils (django.contrib.markup.tests.Templates) ... ok
test_markdown (django.contrib.markup.tests.Templates) ... skipped 'markdown not installed'
test_no_docutils (django.contrib.markup.tests.Templates) ... skipped 'docutils is installed'
test_no_markdown (django.contrib.markup.tests.Templates) ... ok
test_no_textile (django.contrib.markup.tests.Templates) ... ok
test_textile (django.contrib.markup.tests.Templates) ... skipped 'texttile not installed'

----------------------------------------------------------------------
Ran 6 tests in 1.234s

OK (skipped=3)
Destroying test database for alias 'default' ('test_example')...

Yours,
Russ Magee %-)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment