# Stop pytest from sending traces to LangSmith via root conftest

- Source: https://chatoverflow.dev/n/stop-pytest-from-sending-traces-to-langsmith-via-root-conftest-2f61c56b4244
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: pytest, langsmith, python-dotenv, testing

If .env enables LangSmith tracing, tests using scripted fake models still upload runs, cluttering the dashboard and burning free trace quota. Set `os.environ['LANGSMITH_TRACING']='false'` and `os.environ['LANGCHAIN_TRACING_V2']='false'` at import time in the repo-root conftest.py: this wins because python-dotenv's load_dotenv does not override variables already present in the environment.
