From d8bbaf04815a507142a6e67be6e6196be762f395 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 23 Aug 2014 18:57:12 +0100 Subject: [PATCH] Added info about running the test suite in the docs They were in the INSTALL file, which is quite out-of-date now. Also fixed a couple of other things. --- doc/src/install.rst | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/src/install.rst b/doc/src/install.rst index d2a28e49..ec1eeea8 100644 --- a/doc/src/install.rst +++ b/doc/src/install.rst @@ -205,6 +205,33 @@ supported. +.. index:: + single: tests + +.. _test-suite: + +Running the test suite +^^^^^^^^^^^^^^^^^^^^^^ + +The included ``Makefile`` allows to run all the tests included in the +distribution. Just run:: + + make + make check + +The tests run against a database called ``psycopg2_test`` on UNIX socket and +the standard port. You can configure a different database to run the test by +setting the environment variables: + +- :envvar:`PSYCOPG2_TESTDB` +- :envvar:`PSYCOPG2_TESTDB_HOST` +- :envvar:`PSYCOPG2_TESTDB_PORT` +- :envvar:`PSYCOPG2_TESTDB_USER` + +The database should already exist before running the tests. + + + .. index:: single: debug single: PSYCOPG_DEBUG @@ -225,13 +252,13 @@ order to create a debug package: - :ref:`Compile and install ` the package. -- Set the :envvar:`PSYCOPG_DEBUG` variable:: +- Set the :envvar:`PSYCOPG_DEBUG` environment variable:: $ export PSYCOPG_DEBUG=1 - Run your program (making sure that the `!psycopg2` package imported is the one you just compiled and not e.g. the system one): you will have a copious - stream of informations printed on stdout. + stream of informations printed on stderr. .. __: http://initd.org/psycopg/download/