This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
forked from stripe/stripe-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
56 lines (50 loc) · 1.52 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
46
47
48
49
50
51
52
53
54
55
56
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist =
fmt
lint
pyright
mypy
py{312,311,310,39,38,37,36,py3}
ignore_base_python_conflict = false
[tool:pytest]
testpaths = tests
addopts =
--cov-report=term-missing
[testenv]
description = run the unit tests under {basepython}
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
deps =
-r test-requirements.txt
# ignore stripe directory as all tests are inside ./tests
commands = pytest --cov {posargs:-n auto} --ignore stripe
# compilation flags can be useful when prebuilt wheels cannot be used, e.g.
# PyPy 2 needs to compile the `cryptography` module. On macOS this can be done
# by passing the following flags:
# LDFLAGS="-L$(brew --prefix openssl@1.1)/lib"
# CFLAGS="-I$(brew --prefix openssl@1.1)/include"
passenv = LDFLAGS,CFLAGS
[testenv:{lint,fmt,pyright,mypy}]
basepython = python3.10
skip_install = true
commands =
pyright: pyright {posargs}
lint: python -m flake8 --show-source stripe tests setup.py
fmt: ruff format . {posargs}
mypy: mypy {posargs}
deps =
-r requirements.txt
[testenv:coveralls]
description = upload coverage to coveralls.io
skip_install = true
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
passenv = GITHUB_*
commands =
coverage combine
coveralls --service=github
depends = py{312,311,310,39,38,37,36,py3}