Skip to main content

sql evaluator for mocking

Project description

https://travis-ci.org/abe-winter/pg13-py.svg?branch=master

install with pip install pg13

docs at http://pg13.readthedocs.org/en/latest/

pg13 is a SQL evaluator for python designed for testing. Normally when you want to test an application with database dependencies, you have three dangerous options:

  1. artisanal mocking: standard mocking frameworks make you specify the output of every DB call

  2. local db: have a running copy of the database

  3. everything but: test everything but the DB interaction

pg13 takes a different approach:

  • SQL is simulated in python

  • every test can create and populate its own lightweight database

  • tests are completely deterministic

  • parallelization is safe (because parallel tests have no chance of touching the same data)

  • performance: 200+ tests per second on my laptop

See the github readme for examples. https://github.com/abe-winter/pg13-py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pg13-0.1.1.tar.gz (58.1 kB view hashes)

Uploaded Source

Built Distribution

pg13-0.1.1-py2-none-any.whl (180.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page