Find file
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (44 sloc) 2.42 KB

Django Nose lint is a Nose plugin that can automatically fail tests that attempt to do a handful of things that can slow down the test suite. You can use options to configure which actions to fail on.


  • ESOK = Used a TCP socket
  • ECLI = Used the Django Test Client
  • ETEM = Tried to render a Django template
  • ESLO = Test took over 1 second (takes --maxms argument)

  • EALL = All of the above


pip install django-nose-lint

Run it

./ test --lint=EALL --maxms=300


Creating test database for alias 'default'...
ERROR: test_one (tests.MyTest)
Traceback (most recent call last):
  File "/Users/cseibert/projects/django-nose-lint-test/virtualenv/lib/python2.7/site-packages/nose/", line 133, in run
  File "/Users/cseibert/projects/django-nose-lint-test/virtualenv/lib/python2.7/site-packages/nose/", line 151, in runTest
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/", line 376, in __call__
    return*args, **kwds)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/", line 355, in run
  File "/Users/cseibert/projects/django-nose-lint-test/virtualenv/lib/python2.7/site-packages/nose/", line 180, in stopTest
  File "/Users/cseibert/projects/django-nose-lint-test/virtualenv/lib/python2.7/site-packages/nose/plugins/", line 99, in __call__
    return*arg, **kw)
  File "/Users/cseibert/projects/django-nose-lint-test/virtualenv/lib/python2.7/site-packages/nose/plugins/", line 167, in simple
    result = meth(*arg, **kw)
  File "/Users/cseibert/projects/django-nose-lint-test/virtualenv/lib/python2.7/site-packages/noselint/", line 76, in stopTest
    raise DeprecationWarning('DjangoNoseLint Error: ESLO - test took %s ms' % delta_ms)
DeprecationWarning: DjangoNoseLint Error: ESLO - test took 1101 ms

Ran 1 test in 1.104s

FAILED (errors=1)

More info

I have posted a quickstart guide on my blog.