Skip to content

Commit

Permalink
test: fixed some things to make mutmut work
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Oct 24, 2024
1 parent 1139d16 commit 7c2c551
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 40 deletions.
3 changes: 3 additions & 0 deletions src/inline_snapshot/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

import pytest
from inline_snapshot.testing._example import init_env
from rich import box
from rich.console import Console
from rich.panel import Panel
Expand Down Expand Up @@ -54,6 +55,8 @@ def xdist_running(config):
def pytest_configure(config):
global flags

init_env()

_config.config = _config.read_config(config.rootpath / "pyproject.toml")

if config.option.inline_snapshot is None:
Expand Down
11 changes: 11 additions & 0 deletions src/inline_snapshot/testing/_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
from .._types import Snapshot


def init_env():
import inline_snapshot._inline_snapshot as inline_snapshot

inline_snapshot.snapshots = {}
inline_snapshot._update_flags = inline_snapshot.Flags()
inline_snapshot._active = True
external.storage = None
inline_snapshot._files_with_snapshots = set()
inline_snapshot._missing_values = 0


@contextlib.contextmanager
def snapshot_env():
import inline_snapshot._inline_snapshot as inline_snapshot
Expand Down
40 changes: 0 additions & 40 deletions tests/test_typing.py

This file was deleted.

0 comments on commit 7c2c551

Please sign in to comment.