[TIP] (announcing) pg13, an in-process SQL database for mocking

Alexandre Conrad alexandre.conrad at gmail.com
Thu Apr 2 20:05:55 PDT 2015


Test isolation by avoiding artifact data potentially generated by other
tests that didn't cleanup properly for whatever reason and could fail
subsequent tests.
On Apr 2, 2015 7:13 PM, "Randy Syring" <randy at thesyrings.us> wrote:

>  Discussion: what's the point of creating a new database for *every* test?
>
> *Randy Syring*
> Husband | Father | Redeemed Sinner
>
>
> *"For what does it profit a man to gain the whole world and forfeit his
> soul?" (Mark 8:36 ESV)*
>
>  On 04/02/2015 09:32 PM, Abe Winter wrote:
>
> Hi,
>
> I'm presenting pg13, a new python library for SQL mocking. It's fast
> enough to create a new pure-python, in-memory DB for each test. It's
> not complete or mature but supports enough of the basics to get good
> coverage on a simple app.
>
> Performance is around ~200 tests per second on my hardware. This is vs
> 1 test per second if you're creating a postgres DB per test;
> in-process also parallelizes more easily. Sqlite on :memory: can be
> quick but sqlite is not feature-compatible other SQL engines and is
> hard to modify (90k lines of C). pg13's whole SQL engine is under 1000
> lines, pure python, and easy to extend.
>
> More here:
> https://github.com/abe-winter/pg13-py
>
> Thanks,
>
> Abe Winter
>
> _______________________________________________
> testing-in-python mailing listtesting-in-python at lists.idyll.orghttp://lists.idyll.org/listinfo/testing-in-python
>
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150402/4e3a7398/attachment.htm>


More information about the testing-in-python mailing list