Registry / testing / django-test-without-migrations

django-test-without-migrations

JSON →
library0.6pypypiunverified

Disables Django migrations when running tests, significantly speeding up test runs by using the current model state instead of running migrations. Version 0.6 is the latest, with no recent updates. Use it to avoid migration overhead in CI or local testing.

pip install django-test-without-migrations
INSTALL
IMPORT
SIG · DJANGO-TEST-WITHOU
D
django-test-without-migrations
testingpythonv0.6
Install
2.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TestWithoutMigrationsMixin
from test_without_migrations import TestWithoutMigrationsMixin
from django_test_without_migrations import TestWithoutMigrationsMixin

Two usage patterns: setting TEST_RUNNER globally, or mixing into individual test classes.

# settings.py TEST_RUNNER = 'django_test_without_migrations.DjangoTestSuiteRunner' # Or use as a mixin in a test class: from django.test import TestCase from django_test_without_migrations import TestWithoutMigrationsMixin class MyTestCase(TestWithoutMigrationsMixin, TestCase): def test_something(self): self.assertTrue(True)
Debug
Known issues
gotchaDisabling migrations means tables are created directly from models. Ensure your models match the expected schema, as any missing migrations (like field additions) will not be applied. This can mask migration bugs.
fix
Run tests with migrations periodically (e.g., on CI) to catch migration issues.
affects: all
deprecatedDjango 1.10+ deprecates the pattern of overriding TEST_RUNNER with a custom runner. The mixin approach is recommended for newer Django versions.
fix
Use the mixin 'TestWithoutMigrationsMixin' instead of setting TEST_RUNNER if using Django 1.10+.
affects: 0.6
gotchaIf you have multiple databases, the TEST_RUNNER may not handle them correctly. You might need to extend the runner to support additional database aliases.
fix
Write a custom test runner that inherits from DjangoTestSuiteRunner and overrides setup_databases.
affects: all
Upgrade
Version history
0.6latest on PyPI · released Apr 12, 2017
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
django-test-without-migrations — pip install django-test-without-migrations · libregistry