diff --git a/.buildkite/run-tests b/.buildkite/run-tests index e08ada5..322bd39 100755 --- a/.buildkite/run-tests +++ b/.buildkite/run-tests @@ -2,6 +2,7 @@ set -euo pipefail # Default environment variables +export FORCE_COLOR=1 export PYTHON_VERSION="${PYTHON_VERSION:=3.9}" export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=urllib3}" export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID" @@ -68,6 +69,7 @@ docker run \ -e AIOHTTP_NO_EXTENSIONS \ -e FROZENLIST_NO_EXTENSIONS \ -e YARL_NO_EXTENSIONS \ + -e FORCE_COLOR \ --name elasticsearch-serverless-python-tests \ --volume "$(pwd)/junit:/code/elasticsearch-serverless-python/junit" \ --rm \ diff --git a/noxfile.py b/noxfile.py index f018b44..3332867 100644 --- a/noxfile.py +++ b/noxfile.py @@ -33,7 +33,7 @@ @nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"]) def test(session): - session.install(".[dev]", env=INSTALL_ENV, silent=False) + session.install(".[dev]", env=INSTALL_ENV) junit_xml = os.path.join( SOURCE_DIR, "junit", "elasticsearch-serverless-python-junit.xml" @@ -44,9 +44,10 @@ def test(session): "--cov=elasticsearch_serverless", "--cov-config=setup.cfg", f"--junitxml={junit_xml}", - "--log-level=DEBUG", - "--cache-clear", + "--log-level=debug", "-vv", + "--cache-clear", + *(session.posargs), ] session.run(*pytest_argv) diff --git a/pyproject.toml b/pyproject.toml index 757820f..618488a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,9 +98,8 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["elasticsearch_serverless"] -[tool.pytest] +[tool.pytest.ini_options] junit_family = "legacy" -addopts = "-vvv -p no:logging --cov-report=term-missing --cov=elasticsearch_serverless --cov-config=.pyproject.toml" xfail_strict=true [tool.isort]