Skip to content

Commit

Permalink
Support passing pytest arguments via tox (#390)
Browse files Browse the repository at this point in the history
This could be used, for example, to increase verbosity or to skip
particular tests.

Co-authored-by: Prashant Srivastava <50466688+srprash@users.noreply.github.com>
  • Loading branch information
musicinmybrain and srprash committed May 1, 2023
1 parent 4ffd7f6 commit 2976b25
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -107,41 +107,41 @@ setenv =
commands =
coverage erase

py{37,38,39,310,311}-core: coverage run --append --source aws_xray_sdk -m pytest --ignore tests/ext
py{37,38,39,310,311}-core: coverage run --append --source aws_xray_sdk -m pytest --ignore tests/ext {posargs}

ext-aiobotocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiobotocore
ext-aiobotocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiobotocore {posargs}

ext-aiohttp: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiohttp
ext-aiohttp: coverage run --append --source aws_xray_sdk -m pytest tests/ext/aiohttp {posargs}

ext-botocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/botocore
ext-botocore: coverage run --append --source aws_xray_sdk -m pytest tests/ext/botocore {posargs}

ext-bottle: coverage run --append --source aws_xray_sdk -m pytest tests/ext/bottle
ext-bottle: coverage run --append --source aws_xray_sdk -m pytest tests/ext/bottle {posargs}

ext-django: coverage run --append --source aws_xray_sdk -m pytest tests/ext/django
ext-django: coverage run --append --source aws_xray_sdk -m pytest tests/ext/django {posargs}

ext-flask: coverage run --append --source aws_xray_sdk -m pytest tests/ext/flask
ext-flask: coverage run --append --source aws_xray_sdk -m pytest tests/ext/flask {posargs}

ext-flask_sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/flask_sqlalchemy
ext-flask_sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/flask_sqlalchemy {posargs}

ext-httplib: coverage run --append --source aws_xray_sdk -m pytest tests/ext/httplib
ext-httplib: coverage run --append --source aws_xray_sdk -m pytest tests/ext/httplib {posargs}

ext-httpx: coverage run --append --source aws_xray_sdk -m pytest tests/ext/httpx
ext-httpx: coverage run --append --source aws_xray_sdk -m pytest tests/ext/httpx {posargs}

ext-pg8000: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pg8000
ext-pg8000: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pg8000 {posargs}

ext-psycopg2: coverage run --append --source aws_xray_sdk -m pytest tests/ext/psycopg2
ext-psycopg2: coverage run --append --source aws_xray_sdk -m pytest tests/ext/psycopg2 {posargs}

ext-pymysql: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pymysql
ext-pymysql: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pymysql {posargs}

ext-pynamodb: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pynamodb
ext-pynamodb: coverage run --append --source aws_xray_sdk -m pytest tests/ext/pynamodb {posargs}

ext-requests: coverage run --append --source aws_xray_sdk -m pytest tests/ext/requests
ext-requests: coverage run --append --source aws_xray_sdk -m pytest tests/ext/requests {posargs}

ext-sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy
ext-sqlalchemy: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy {posargs}

py{37,38,39,310,311}-ext-sqlalchemy_core: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy_core
py{37,38,39,310,311}-ext-sqlalchemy_core: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlalchemy_core {posargs}

ext-sqlite3: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlite3
ext-sqlite3: coverage run --append --source aws_xray_sdk -m pytest tests/ext/sqlite3 {posargs}

; TODO: add additional logic to combine coverage from "core" and "ext" test runs
; codecov

0 comments on commit 2976b25

Please sign in to comment.