<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Discussion: what's the point of creating a new database for *every*
test?<br>
<div class="moz-signature"><br>
<b>Randy Syring</b><br>
<small>Husband | Father | Redeemed Sinner</small><br>
<br>
<i><small>"For what does it profit a man to gain the whole world<br>
and forfeit his soul?" (Mark 8:36 ESV)</small></i>
<br>
<br>
</div>
<div class="moz-cite-prefix">On 04/02/2015 09:32 PM, Abe Winter
wrote:<br>
</div>
<blockquote
cite="mid:CALwyE5fC7ppxjJk=e9rFNSd6yNGznkA=PeLQt20Odx6KM177Gg@mail.gmail.com"
type="cite">
<pre wrap="">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:
<a class="moz-txt-link-freetext" href="https://github.com/abe-winter/pg13-py">https://github.com/abe-winter/pg13-py</a>
Thanks,
Abe Winter
_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<br>
</body>
</html>