diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-03 18:47:19 -0800 |
|---|---|---|
| committer | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-10 10:55:58 -0800 |
| commit | 389f6c08d9536060184bfd5c8ea2491a4a91c2fb (patch) | |
| tree | f85e494ab9c681494616ec6bb9b9d01852c62f90 /scripts | |
| parent | c86e682153f4cb8d99e490b2af964f3f11e3489f (diff) | |
| download | psycopg2-389f6c08d9536060184bfd5c8ea2491a4a91c2fb.tar.gz | |
Avoid installing tests to site-packages
For library end users, there is no need to install tests alongside the
package itself. This keeps the tests available for development without
adding extra packages to user's site-packages directory. Reduces the
size of the installed package. Avoids accidental execution of test code
by an installed package.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/refcounter.py | 4 | ||||
| -rwxr-xr-x | scripts/travis_test.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/refcounter.py b/scripts/refcounter.py index f1642e7..f41dc21 100755 --- a/scripts/refcounter.py +++ b/scripts/refcounter.py @@ -30,8 +30,8 @@ from collections import defaultdict def main(): opt = parse_args() - import psycopg2.tests - test = psycopg2.tests + import tests + test = tests if opt.suite: test = getattr(test, opt.suite) diff --git a/scripts/travis_test.sh b/scripts/travis_test.sh index 033482b..0320654 100755 --- a/scripts/travis_test.sh +++ b/scripts/travis_test.sh @@ -34,13 +34,13 @@ run_test () { export PSYCOPG2_TEST_REPL_DSN= unset PSYCOPG2_TEST_GREEN python -c \ - "from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')" \ + "import tests; tests.unittest.main(defaultTest='tests.test_suite')" \ $VERBOSE printf "\n\nRunning tests against PostgreSQL $VERSION (green mode)\n\n" export PSYCOPG2_TEST_GREEN=1 python -c \ - "from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')" \ + "import tests; tests.unittest.main(defaultTest='tests.test_suite')" \ $VERBOSE } |
