File: conftest.py

package info (click to toggle)
python-inline-snapshot 0.31.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,708 kB
  • sloc: python: 9,261; makefile: 39; sh: 32
file content (12 lines) | stat: -rw-r--r-- 251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import pytest

from inline_snapshot._global_state import snapshot_env


@pytest.fixture(autouse=True)
def snapshot_env_for_doctest(request):
    if hasattr(request.node, "dtest"):
        with snapshot_env():
            yield
    else:
        yield