diff --git a/.gitignore b/.gitignore index 8b0cffa54e7..bfd2c66ffcc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ gha-creds-*.json .env .ruff_cache .pytest_cache +.coverage .nox *.log */file::memory:?cache=shared diff --git a/noxfile.py b/noxfile.py index 1f0817f4cfe..38552a9c36f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -72,7 +72,15 @@ def tests(session, shard): if shard == "llamaindex": session.posargs.insert(0, "-n4") - session.run("pytest", *session.posargs, *test_dirs, env=env) + session.run( + "pytest", + "--cov=weave", + "--cov-report=html", + "--cov-branch", + *session.posargs, + *test_dirs, + env=env, + ) # Configure pytest diff --git a/pyproject.toml b/pyproject.toml index bfe44c21cab..605ceabb8ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,7 @@ test = [ "nox", "pytest>=8.2.0", "pytest-asyncio>=0.23.6", + "pytest-cov>=5.0.0", "pytest-xdist>=3.1.0", "pytest-rerunfailures>=12.0", "clickhouse_connect==0.7.0",