Run pytest --verbose in CI
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index adea761..899203d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml
@@ -9,6 +9,7 @@ workflow_dispatch: env: LATEST_PY_VERSION: '3.10' + PYTEST_VERBOSE: 'true' jobs: # Run tests for each supported python version
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4da9bd8..87ac56e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml
@@ -19,6 +19,7 @@ env: LATEST_PY_VERSION: '3.10' + PYTEST_VERBOSE: 'true' STRESS_TEST_MULTIPLIER: 5 jobs:
diff --git a/noxfile.py b/noxfile.py index 737e266..93f6cbc 100644 --- a/noxfile.py +++ b/noxfile.py
@@ -7,6 +7,7 @@ * All other commands: the current environment will be used instead of creating new ones * Run `nox -l` to see all available commands """ +from os import getenv from os.path import join from shutil import rmtree @@ -57,11 +58,16 @@ @session(python=False, name='cov') def coverage(session): """Run tests and generate coverage report""" - cov_formats = session.posargs or DEFAULT_COVERAGE_FORMATS - cov_format_args = [f'--cov-report={f}' for f in cov_formats] + cmd = f'pytest {UNIT_TESTS} {INTEGRATION_TESTS} -rs {XDIST_ARGS} --cov'.split(' ') - cmd = f'pytest {UNIT_TESTS} {INTEGRATION_TESTS} -rs {XDIST_ARGS} --cov' - session.run(*cmd.split(' '), *cov_format_args) + # Add coverage formats + cov_formats = session.posargs or DEFAULT_COVERAGE_FORMATS + cmd += [f'--cov-report={f}' for f in cov_formats] + + # Add verbose flag, if set by environment + if getenv('PYTEST_VERBOSE'): + cmd += ['--verbose'] + session.run(*cmd) @session(python=False, name='stress')
diff --git a/poetry.lock b/poetry.lock index 0b6568a..64c4d78 100644 --- a/poetry.lock +++ b/poetry.lock
@@ -78,14 +78,14 @@ [[package]] name = "boto3" -version = "1.21.42" +version = "1.21.43" description = "The AWS SDK for Python" category = "main" optional = true python-versions = ">= 3.6" [package.dependencies] -botocore = ">=1.24.42,<1.25.0" +botocore = ">=1.24.43,<1.25.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.5.0,<0.6.0" @@ -94,7 +94,7 @@ [[package]] name = "botocore" -version = "1.24.42" +version = "1.24.43" description = "Low-level, data-driven core of boto 3." category = "main" optional = true @@ -451,14 +451,13 @@ [[package]] name = "myst-parser" -version = "0.17.1" +version = "0.17.2" description = "An extended commonmark compliant parser, with bridges to docutils & sphinx." category = "main" optional = true python-versions = ">=3.7" [package.dependencies] -attrs = ">=19" docutils = ">=0.15,<0.18" jinja2 = "*" markdown-it-py = ">=1.0.0,<3.0.0" @@ -535,15 +534,15 @@ [[package]] name = "platformdirs" -version = "2.5.1" +version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] [[package]] name = "pluggy" @@ -1184,11 +1183,11 @@ [[package]] name = "typing-extensions" -version = "4.1.1" -description = "Backported and Experimental Type Hints for Python 3.6+" +version = "4.2.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "uc-micro-py" @@ -1318,12 +1317,12 @@ {file = "beautifulsoup4-4.11.1.tar.gz", hash = "sha256:ad9aa55b65ef2808eb405f46cf74df7fcb7044d5cbc26487f96eb2ef2e436693"}, ] boto3 = [ - {file = "boto3-1.21.42-py3-none-any.whl", hash = "sha256:895fb88c69be78f82cfee58a79c97a3ad8d4a2a1209041a411d7d6b9fc5393e4"}, - {file = "boto3-1.21.42.tar.gz", hash = "sha256:bcb541175a7d190dd919a0af0e807ee6e9d26f135551e741b10d94343f2d7588"}, + {file = "boto3-1.21.43-py3-none-any.whl", hash = "sha256:cb872b71e23d139300bc825564c3f24c4b8a3f8c5a4a51458df7ee35cc8c1a87"}, + {file = "boto3-1.21.43.tar.gz", hash = "sha256:d9428ac1c0d75ad50289cae8cc9a77f56ac04d0f7eee6e7d31167d577df3f6cb"}, ] botocore = [ - {file = "botocore-1.24.42-py3-none-any.whl", hash = "sha256:14aee41c8bf59d2dd2d89e8751fa37d3c95dcb92707d1966aa02697e914c1417"}, - {file = "botocore-1.24.42.tar.gz", hash = "sha256:a2baa9484bbaee96ef312c049b8e360badcab58329e487b57567644a571b5f4a"}, + {file = "botocore-1.24.43-py3-none-any.whl", hash = "sha256:501d0b0ae378f06d6d23114e4e5f0c166975c34f9a0e34bfbc5bf388fc5f04e1"}, + {file = "botocore-1.24.43.tar.gz", hash = "sha256:76173ec95dce29217ffbd367e689a8bfe056ed2db14b622fb5bfc3903f05b6db"}, ] bson = [ {file = "bson-0.5.10.tar.gz", hash = "sha256:d6511b2ab051139a9123c184de1a04227262173ad593429d21e443d6462d6590"}, @@ -1521,8 +1520,8 @@ {file = "mdurl-0.1.1.tar.gz", hash = "sha256:f79c9709944df218a4cdb0fcc0b0c7ead2f44594e3e84dc566606f04ad749c20"}, ] myst-parser = [ - {file = "myst-parser-0.17.1.tar.gz", hash = "sha256:45fe6407d49221bdcc10d5000f4f2f3ff2614af268dd33f351f7230d6059f0d8"}, - {file = "myst_parser-0.17.1-py3-none-any.whl", hash = "sha256:84815cadbb9f3404651549e5fe332301e4e8c15712013738f67c253f00b8e58f"}, + {file = "myst-parser-0.17.2.tar.gz", hash = "sha256:4c076d649e066f9f5c7c661bae2658be1ca06e76b002bb97f02a09398707686c"}, + {file = "myst_parser-0.17.2-py3-none-any.whl", hash = "sha256:1635ce3c18965a528d6de980f989ff64d6a1effb482e1f611b1bfb79e38f3d98"}, ] nodeenv = [ {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, @@ -1545,8 +1544,8 @@ {file = "pbr-5.8.1.tar.gz", hash = "sha256:66bc5a34912f408bb3925bf21231cb6f59206267b7f63f3503ef865c1a292e25"}, ] platformdirs = [ - {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, - {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, @@ -1996,8 +1995,8 @@ {file = "tornado-6.1.tar.gz", hash = "sha256:33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791"}, ] typing-extensions = [ - {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, - {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, + {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, + {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, ] uc-micro-py = [ {file = "uc-micro-py-1.0.1.tar.gz", hash = "sha256:b7cdf4ea79433043ddfe2c82210208f26f7962c0cfbe3bacb05ee879a7fdb596"},
diff --git a/pyproject.toml b/pyproject.toml index 833b5cb..ffeb857 100644 --- a/pyproject.toml +++ b/pyproject.toml
@@ -33,21 +33,16 @@ urllib3 = ">=1.25.5" # Use a slightly newer version than required by requests (for bugfixes) attrs = ">=21.2" # For response data models cattrs = ">=22.0" # For response serialization -platformdirs = "^2.5" # For options that use platform-specific user cache dirs -url-normalize = "^1.4" # For improved request matching +platformdirs = "^2.5" # For features that use platform-specific system directories +url-normalize = "^1.4" # For more accurate request matching # Optional backend dependencies boto3 = {optional=true, version="^1.15"} botocore = {optional=true, version="^1.18"} -pymongo = [ - {optional=true, version=">=3,<4.1", python="<3.9"}, - {optional=true, version=">=3", python=">=3.9"}, - ] -redis = [ - {optional=true, version=">=3,<4.2", python="<3.9"}, - {optional=true, version=">=3", python=">=3.9"}, - ] - +pymongo = [{optional=true, version=">=3,<4.1", python="<3.9"}, + {optional=true, version=">=3", python=">=3.9"}] +redis = [{optional=true, version=">=3,<4.2", python="<3.9"}, + {optional=true, version=">=3", python=">=3.9"}] # Optional serialization dependencies bson = {optional=true, version=">=0.5"}