We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac0419c commit 8cd8c8cCopy full SHA for 8cd8c8c
test/integration/test_main.py
@@ -2,7 +2,7 @@
2
3
import subprocess
4
from pathlib import Path
5
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, assert_type
6
7
import pytest
8
from hexdoc.cli.app import build, callback
@@ -28,7 +28,14 @@
28
29
def rename_snapshot(snapshot: SnapshotAssertion, index: str):
30
location = snapshot.test_location
31
- location.filepath = location.filepath.replace(".py", f"_{index}.py") # TODO: hack
+
32
+ # TODO: hack
33
+ assert_type(location.filepath, str)
34
+ object.__setattr__(
35
+ location,
36
+ "filepath",
37
+ location.filepath.replace(".py", f"_{index}.py"),
38
+ )
39
40
41
@pytest.fixture(scope="session", autouse=True)
0 commit comments