TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Much faster testing in Django

2 pointsby marklitover 10 years ago

1 comment

digisthover 10 years ago
I&#x27;ve also recently desired faster tests with django, so I&#x27;ve switched to the &#x27;nose&#x27; test runner, which allows DB reuse between runs:<p><a href="https://github.com/django-nose/django-nose" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;django-nose&#x2F;django-nose</a><p>It takes testing down from dozens of seconds to minutes in my case to a few seconds or even less.<p>You just need to remember to run &#x27;clean&#x27; (no REUSE_DB flag) once, and also remember that if you change your DB&#x2F;have new migrations, run them and re-run the tests clean. Then you can can go back to reusing the DB again:<p>Prime it: .&#x2F;manage.py test mystuff --failfast -s -v0<p>Run it: REUSE_DB=1 .&#x2F;manage.py test mystuff --failfast -s -v0<p>Ran 22 tests in 1.475s