mirror of
https://github.com/langchain-ai/delta-rs.git
synced 2026-07-18 20:34:31 -04:00
3c5a6bca41
Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
21 lines
595 B
Python
21 lines
595 B
Python
import os
|
|
import pathlib
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def doctest_setup(
|
|
request: pytest.FixtureRequest,
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
tmp_path: pathlib.Path,
|
|
) -> None:
|
|
if isinstance(request.node, pytest.DoctestItem):
|
|
# disable color for doctests so we don't have to include
|
|
# escape codes in docstrings
|
|
monkeypatch.setitem(os.environ, "NO_COLOR", "1")
|
|
# Explicitly set the column width
|
|
monkeypatch.setitem(os.environ, "COLUMNS", "80")
|
|
# Work in a temporary directory
|
|
monkeypatch.chdir(str(tmp_path))
|