Thank you for the tip, I'll certainly use it a lot.

Do you want me to close my PR rework my commit (use memory sqlite DB)
and make another PR, or just commit on the PR branch ? Sorry if stupid
questions, I'm just a beginner with qgis git and github.

On 14/07/2013 06:16, Nathan Woodrow wrote:
>
> In tests/src/python/test_qgsspatialiteprovider.py:
>
> > +# Convenience instances in case you may need them
> > +QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp()
> > +
> > +
> > +def die(error_message):
> > +    raise Exception(error_message)
> > +
> > +class TestQgsSpatialiteProvider(TestCase):
> > +
> > +    @classmethod
> > +    def setUpClass(cls):
> > +        """Run before all tests"""
> > +        # create test db
> > +        if os.path.exists("test.sqlite") :
> > +            os.remove("test.sqlite")
> > +        con = sqlite3.connect("test.sqlite")
>
> I think using a memory sqlite database base might be a better idea for
> testing. http://docs.python.org/2/library/sqlite3.html#sqlite3.connect
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/qgis/Quantum-GIS/pull/715/files#r5181035>.
>