Nose Does Not Launch Django Boards

Like this question . However, in my case, none of my doctest models work.

I am using Django 1.3 beta 1 .

 # settings.py TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' INSTALLED_APPS = ( ##...a bunch of django apps 'django_nose', 'south', 'my_project.my_app', ) 

One of my models:

 class ItemType(models.Model): ''' >>> temType.objects.all().count() == 0 True ''' name = models.CharField(max_length=32) def __unicode__(self): return self.name 

It should crash due to initial_data fixture, but just in case, I tried it with the following:

 class ItemType(models.Model): ''' >>> ItemType.objects.all().count() == -1 True ''' name = models.CharField(max_length=32) def __unicode__(self): return self.name 

I tried to do the following:

 ./manage.py test --with-doctest my_app 

With the Django test runner, I simply type the following for my processing:

 ./manage.py test my_app 

Any suggestions?

+4
source share
2 answers

In the settings, just enable this option:

 NOSE_ARGS = ['--with-doctest', other_nose_args] 

See django-nose documentation for more options

+2
source

It may be too late, but can you run tests with a higher --verbosity ?

If you find that messages that files are being skipped because they are being executed, try adding --exe to your NOSE_ARGS or chmod -x the_file.py .

0
source

Source: https://habr.com/ru/post/1334119/


All Articles