Skip to content

Commit 509f37a

Browse files
authored
Reduce logging (#55)
But also log in color and allow passing options to nox. And fix the pytest configuration in pyproject.toml.
1 parent 10cb6ed commit 509f37a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.buildkite/run-tests

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -euo pipefail
33

44
# Default environment variables
5+
export FORCE_COLOR=1
56
export PYTHON_VERSION="${PYTHON_VERSION:=3.9}"
67
export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=urllib3}"
78
export EC_PROJECT_NAME="$EC_PROJECT_PREFIX-$BUILDKITE_JOB_ID"
@@ -68,6 +69,7 @@ docker run \
6869
-e AIOHTTP_NO_EXTENSIONS \
6970
-e FROZENLIST_NO_EXTENSIONS \
7071
-e YARL_NO_EXTENSIONS \
72+
-e FORCE_COLOR \
7173
--name elasticsearch-serverless-python-tests \
7274
--volume "$(pwd)/junit:/code/elasticsearch-serverless-python/junit" \
7375
--rm \

noxfile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
@nox.session(python=["3.7", "3.8", "3.9", "3.10", "3.11"])
3535
def test(session):
36-
session.install(".[dev]", env=INSTALL_ENV, silent=False)
36+
session.install(".[dev]", env=INSTALL_ENV)
3737

3838
junit_xml = os.path.join(
3939
SOURCE_DIR, "junit", "elasticsearch-serverless-python-junit.xml"
@@ -44,9 +44,10 @@ def test(session):
4444
"--cov=elasticsearch_serverless",
4545
"--cov-config=setup.cfg",
4646
f"--junitxml={junit_xml}",
47-
"--log-level=DEBUG",
48-
"--cache-clear",
47+
"--log-level=debug",
4948
"-vv",
49+
"--cache-clear",
50+
*(session.posargs),
5051
]
5152
session.run(*pytest_argv)
5253

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ include = [
9898
[tool.hatch.build.targets.wheel]
9999
packages = ["elasticsearch_serverless"]
100100

101-
[tool.pytest]
101+
[tool.pytest.ini_options]
102102
junit_family = "legacy"
103-
addopts = "-vvv -p no:logging --cov-report=term-missing --cov=elasticsearch_serverless --cov-config=.pyproject.toml"
104103
xfail_strict=true
105104

106105
[tool.isort]

0 commit comments

Comments
 (0)