diff --git a/pyproject.toml b/pyproject.toml index 90d888e7..e81b2b5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -317,7 +317,6 @@ max-complexity = 20 "test/solidlsp/bsl/**" = ["RUF001", "RUF002", "RUF003"] [tool.pytest.ini_options] -addopts = "--snapshot-patch-pycharm-diff" markers = [ "clojure: language server running for Clojure", "crystal: language server running for Crystal", diff --git a/test/conftest.py b/test/conftest.py index c75e12db..d973bb48 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -32,6 +32,11 @@ logging.configure(level=PYTEST_LOG_LEVEL) log = logging.getLogger(__name__) +def pytest_configure(config: pytest.Config) -> None: + if os.getenv("PYCHARM_HOSTED") == "1": + config.option.patch_pycharm_diff = True + + @pytest.fixture(scope="session") def resources_dir() -> Path: """Path to the test resources directory."""