forked from mkleehammer/pyodbc
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
45 lines (43 loc) · 1.84 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# USAGE
# First, install tox. Tox should typically be available from the command line so it
# is recommended to install it using pipx (pipx install tox).
#
# Run tests against SQL Server, Postgres, and MySQL databases by providing connection
# strings as parameters, for example:
# tox -- --sqlserver "DSN=localhost19" --postgresql "DSN=pg11" --mysql "DSN=mysql57"
# You can test against multiple versions of the same database, here with added verbosity:
# tox -- --sqlserver "DSN=localhost17" --sqlserver "DSN=localhost19" -v
# Run tests with specific names by using the -k option (per pytest), here in quiet mode:
# tox -- --sqlserver "DSN=localhost17" -k "unicode" -q
# Note the use of "--" to separate the "tox" parameters from the parameters for the
# tests.
#
# Alternatively, database connection info can be provided in a configuration file, in
# the standard INI format. The default filename is "tmp/database.cfg" within this repo,
# but this can be overriden with the PYODBC_DATABASE_CFG environment variable. Here
# is an example of a suitable configuration file:
# [sqlserver_2017]
# DSN=localhost17
#
# [sqlserver_2019]
# DSN=localhost19
#
# [POSTGRES]
# user = test
# password = test_password
# Any section names beginning with "sqlserver", "postgres" or "mysql" (case-insensitive)
# will be used for testing. The key/value pairs in each section will be used to connect
# to the relevant database.
#
# Naturally, test databases must be up and available before running the tests.
# Currently, only SQL Server, PostgreSQL, and MySQL are supported through tox.
# Python 2.7 is not supported.
[tox]
skipsdist = true
[testenv:unit_tests]
description = Run the pyodbc unit tests
deps = -r requirements-test.txt
sitepackages = false
commands =
python -m pip install --force-reinstall --no-deps .
python .{/}tests3{/}run_tests.py {posargs}