Skip to content
This repository

Better db isolation control #54

Open
wants to merge 4 commits into from

1 participant

tdivis
tdivis
  • reworked internal implementation of how (or rather when) database creation, transaction begin/rollback, flush and fixtures loading are made so that minimum of these time-consuming operations are made, and developer now have better control when those operations are (or are not) done.
  • database isolation control now works for packages and modules too (i.e. if you want db flush after each TestCase or test function in the module, you just put database_flush = True at the beginning of the module)
  • added tests for testing features mentioned above
Tomas Divis added some commits
Tomas Divis Big cleanup
 * Fixed some unresolved imports and undefined variables
 * Removed lot of unused imports and variables, removed some re-imports
 * PEP8-ify white spaces, removed trailing spaces, blank lines are blank etc.
 * Added some false positive error/warning disabling for pylint and pydev
 * Did some refactoring to remove code duplication
 * Fixed lot of object's attributes were not defined in __init__
 * Refactored some variable names to code be more readable
 * Removed some variables redefinitions (either build-ins and few locals)
0196efe
Tomas Divis Fixed required_sane_plugins check
Check for required_sane_plugins, called from is_skipped() in startTest
was causing errors because not all plugins were enabled at that time
(startTest methods of all plugins are called sequentially), so enable_test
had to be moved to beforeTest plugin method.

This was revealed by failing test testproject.test.test_database.TestFixturesLoadedProperly.test_model_loaded, which now passes.
b9460d5
Tomas Divis Better control over database isolation of tests
 * reworked internal implementation of how (or rather when) database creation, transaction begin/rollback, flush and fixtures loading are made so that minimum of these time-consuming operations are made, and developer now have better control when those operations are (or are not) done.
 * database isolation control now works for packages and modules too (i.e. if you want db flush after each TestCase or test function in the module, you just put database_flush = True at the beginning of the module)
 * added tests for testing features mentioned above
580fce7
Tomas Divis Fix: Tests in testproject didn't flushed database at end (revealed by…
… failing tests after running tests with --persist-test-database parameter 2 times)
fefa48e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 4 unique commits by 1 author.

Mar 18, 2012
Tomas Divis Big cleanup
 * Fixed some unresolved imports and undefined variables
 * Removed lot of unused imports and variables, removed some re-imports
 * PEP8-ify white spaces, removed trailing spaces, blank lines are blank etc.
 * Added some false positive error/warning disabling for pylint and pydev
 * Did some refactoring to remove code duplication
 * Fixed lot of object's attributes were not defined in __init__
 * Refactored some variable names to code be more readable
 * Removed some variables redefinitions (either build-ins and few locals)
0196efe
Apr 04, 2012
Tomas Divis Fixed required_sane_plugins check
Check for required_sane_plugins, called from is_skipped() in startTest
was causing errors because not all plugins were enabled at that time
(startTest methods of all plugins are called sequentially), so enable_test
had to be moved to beforeTest plugin method.

This was revealed by failing test testproject.test.test_database.TestFixturesLoadedProperly.test_model_loaded, which now passes.
b9460d5
Apr 06, 2012
Tomas Divis Better control over database isolation of tests
 * reworked internal implementation of how (or rather when) database creation, transaction begin/rollback, flush and fixtures loading are made so that minimum of these time-consuming operations are made, and developer now have better control when those operations are (or are not) done.
 * database isolation control now works for packages and modules too (i.e. if you want db flush after each TestCase or test function in the module, you just put database_flush = True at the beginning of the module)
 * added tests for testing features mentioned above
580fce7
Apr 11, 2012
Tomas Divis Fix: Tests in testproject didn't flushed database at end (revealed by…
… failing tests after running tests with --persist-test-database parameter 2 times)
fefa48e
Something went wrong with that request. Please try again.