Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3987312
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:07:07+00:00 2026-05-20T06:07:07+00:00

my Django tests run really slowly, but it’s not the test’s fault. At the

  • 0

my Django tests run really slowly, but it’s not the test’s fault.

At the moment, the whole process takes 14s, but only 0.1s of that is running tests. The first few seconds are creating tables & indexes, the rest is applying the project’s many fixtures.

What’s the best way to deal with this? I think there is a way of specifying which fixtures to load in each test, but I need most of them to do most tests…

A solution I think would work is if the tests didn’t drop the tables after each run, that way there would be no need to create & populate the database each run-through of the tests. Most tests don’t even write to the DB.

What’s the best way to optimise the fixture-loading part of Django tests?
Thanks!

(I’m using nose, but otherwise just plain Django and sqlite)

EDIT: I should have mentioned that I’m using an in-memory sqlite database. What I’m looking for – specifically – is an optimisation of the fixture-loading section of the test.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:07:08+00:00Added an answer on May 20, 2026 at 6:07 am

    “but I need most of them to do most tests”…

    Sorry about this, but to speed things up you’re going to have to do some thinking.

    “I think there is a way of specifying which fixtures to load in each test”

    This is a disturbing thing to read. Have you looked at your tests recently?

    Your tests do — specifically — list the fixtures. You need to minimize that list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I run the following command: >python manage.py test Django looks at tests.py in
I normally run tests for specific django apps, but I was curious and decided
I have a problem to run selenium tests with separate django command. Default test
I like django unit tests, cause they create and drop test database on run.
When I run my project's default tests, one test is failing: FAIL: test_current_site_in_context_after_login (django.contrib.auth.tests.views.LoginTest)
Currently when I run a set of unit-tests on Django, each test makes its
When I run django tests through manage.py test is there a way to output
When I run my tests in Django, after a fail I got several pages
I'm trying to run Selenium tests for a Django app on production server. I
it's fairly easy to set up Eclipse to run a django project's tests created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.