#2997 Speedup local test execution by 'caching' sqlite db file
Merged by pingou. Opened by bkabrda.
bkabrda/pagure tests-sqlite-speedup  into  master

Download 2997.patch

This PR makes test execution faster by creating the sqlite file only once and then just creating a copy of it for every test. My local timing shows 0.3 seconds speedup for every test case that uses DB (which seems to be almost all test cases), so a speedup for the whole test suite could be around 5 minutes, even though I didn't measure that.

(Just as a side note, I have SSD disk. For normal HDDs the speedup would likely be even more significant.)

This seems out of a class, am I missing something?

That's intentional. Top-level setUp in __init__.py is considered package-level setup function and will only be run once for the whole test suite: http://nose.readthedocs.io/en/latest/writing_tests.html#test-packages

Thanks for this :)

Pull-Request has been merged by pingou

Metadata