为什么django-nose在我的模型中运行doctests? [英] Why isn't django-nose running the doctests in my models?
本文介绍了为什么django-nose在我的模型中运行doctests?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
class TestModel1(models.Model )
>>打印'pass'
pass
pass
class TestModel2 (model.Model):
>>>打印'pass'
pass
class Meta:
abstract = True
pass
第一个doctest不运行,第二个doctest不运行。为什么会这样?
解决方案
http://github.com/jbalogh/django-nose/issues/2
如果是这样,请尝试升级django-nose
I'm trying to use doctests with django-nose. All my doctests are running, except not any doctests within a model (unless it is abstract).
class TestModel1(models.Model):
"""
>>> print 'pass'
pass
"""
pass
class TestModel2(models.Model):
"""
>>> print 'pass'
pass
"""
class Meta:
abstract = True
pass
The first doctest does not run and the second does. Why is this?
解决方案
Any chance you're getting bitten by this? http://github.com/jbalogh/django-nose/issues/2 If so, try upgrading django-nose
这篇关于为什么django-nose在我的模型中运行doctests?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文