This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Markus Korn
committed
Nov 20, 2015
1 parent
eaaf759
commit 9cef268
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# python-ldapdb slows down django tests significantly | ||
|
||
reproduce this behaviour using docker and docker-compose by running | ||
|
||
``` | ||
$ docker-compose build | ||
[...] | ||
$ docker-compose run web python manage.py test | ||
Creating test database for alias 'default'... | ||
.... | ||
---------------------------------------------------------------------- | ||
Ran 4 tests in 0.153s | ||
OK | ||
Destroying test database for alias 'default'... | ||
$ docker-compose run web python manage.py test --settings mysite.fast_tests | ||
Creating test database for alias 'default'... | ||
.... | ||
---------------------------------------------------------------------- | ||
Ran 4 tests in 0.002s | ||
OK | ||
Destroying test database for alias 'default'... | ||
``` | ||
|
||
`fast_tests` removes the `ldapdb.backends.ldap` database backend, which makes tests significantly faster. | ||
|
||
Notes: | ||
* there is not a single code or tests which is acually using python-ldapdb | ||
* speed slows down liniar with the number of tests, so slow down is not because of initial test overhead |