-
Notifications
You must be signed in to change notification settings - Fork 573
Expand file tree
/
Copy pathtox.ini
More file actions
41 lines (39 loc) · 1.66 KB
/
tox.ini
File metadata and controls
41 lines (39 loc) · 1.66 KB
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
# USAGE
# First, install the tox utility. Tox should be available directly from the command
# line, so it is recommended to install it using pipx ("pipx install tox").
#
# The unit test scripts get database connection strings from environment variables.
# Those variables can be set manually in the shell or can be stored in a "pytest.ini"
# configuration file in this directory. Here is an example of pytest.ini:
#
# [pytest]
# env =
# PYODBC_SQLITE=driver={SQLite3 ODBC Driver};Database=:memory:
# PYODBC_SQLSERVER=DSN=pyodbc-sqlserver
# PYODBC_POSTGRESQL=DSN=pyodbc-postgres
# PYODBC_MYSQL=DSN=mysql;charset=utf8mb4
#
# Naturally, the relevant databases must be up and available before running tox.
# To run tests against only certain databases, comment out the relevant "pytest"
# commands below.
#
# Run the unit tests against multiple versions of Python by simply calling "tox" from
# this directory. To run tests against only one version of Python, use the "-e" option,
# for example, "tox -e py312".
#
# To override the pytest default parameters, use "--", e.g. "tox -e py312 -- -rA".
[tox]
skipsdist = true
env_list = py{39,310,311,312,313,314}
[testenv]
description = Run the pyodbc unit tests
deps =
pytest
pytest-env
sitepackages = false
commands =
python -m pip install --quiet --force-reinstall --no-deps .
python -m pytest {posargs:--no-header --disable-warnings} ./tests/sqlite_test.py
python -m pytest {posargs:--no-header --disable-warnings} ./tests/sqlserver_test.py
python -m pytest {posargs:--no-header --disable-warnings} ./tests/postgresql_test.py
python -m pytest {posargs:--no-header --disable-warnings} ./tests/mysql_test.py