#16622: django.test.TestCase slow using PostgreSQL 8.4.4 --------------------------------------+----------------------------------- Reporter: valhallasw | Owner: nobody Type: Bug | Status: new Milestone: | Component: Testing framework Version: 1.3 | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | --------------------------------------+-----------------------------------
Comment (by ramiro): Sorry, posted last comment when I was too tired so it lacked details, should have made clear my testing conditions: A simple app and a !TestCase with only one test method: {{{ from django.db import models class Person(models.Model): age = models.IntegerField() }}} {{{ from django.test import TestCase from models import Person class SimpleTest(TestCase): def test_a(self): self.assertEqual(0, Person.objects.filter(age=42).count()) # added afterwards: #def test_b(self): # self.assertEqual(0, Person.objects.filter(pk=314).count()) }}} Now (just in case, even when `manage.py test` already runs tests of all django.contrib apps listed in INSTALLED_APPS), I've added another test method and another similar simple app with its own tests. But number of TRUNCATE operation stays at one here (most surely because of this [https://code.djangoproject.com/browser/django/trunk/django/db/backends/creation.py#L241 `flush` operation] added in these commits.) Count me as also confused on why valhallasw sees it once per test. -- Ticket URL: <https://code.djangoproject.com/ticket/16622#comment:9> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.