Skip to main content

Capture SQL queries being generated from a nosetests run

Project description

SQLCapture nose plugin

Capture SQL queries being generated from a nosetests run

https://travis-ci.org/freshbooks/nose-sqlcapture.svg?branch=master

Installation

Do `pip install nose-sqlcapture` in your project. Your project should already have `nosetests` and `sqlalchemy` installed.

Usage

`nosetests [other options] --with-sqlcapture --sqlcapture-filename=sql.log --sqlcapture-format=json`

  • sqlcapture-filename the output file. Default: /tmp/sqlcapture.log

  • sqlcapture-format the format of the log file, either json or plain. Default: plain

Formats

Plain (plain)

Output in plain-text form that’s meant for human consumption. The output is of the following format:

test1
test2
SQL1
---
test1
test3
SQL2
---
...

JSON (json)

Ouptut the queries and their corresponding tests in json format:

{
    SQL1: [test1, test2],
    SQL2: [test1, test3],
    ...
}

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

nose-sqlcapture-1.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nose_sqlcapture-1.0.2-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nose-sqlcapture-1.0.2.tar.gz.

File metadata

File hashes

Hashes for nose-sqlcapture-1.0.2.tar.gz
Algorithm Hash digest
SHA256 04ec61036db80990c695dad4f46b226a6a182d3474fdc043ff22a21cea75257a
MD5 74ffbb314991aab2055f666f40ced501
BLAKE2b-256 1277777f4d72effade3b34e386b87a09624a280f3f94a0777d744959dd949369

See more details on using hashes here.

File details

Details for the file nose_sqlcapture-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nose_sqlcapture-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dcbe2c18b7182a5beb64003ded11d2733f531f6441f0627b00ce581faaed7d90
MD5 dbde239a21c3de43ca1664c643f782a2
BLAKE2b-256 5f0c60e571628bcb68ad79fa961e71b8ffd6ac6e15054fbe78d9b0da7e586605

See more details on using hashes here.

Supported by

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