diff -urNP inline_snapshot-0.31.1.orig/docs/categories.md inline_snapshot-0.31.1/docs/categories.md --- inline_snapshot-0.31.1.orig/docs/categories.md 2020-02-02 00:00:00.000000000 +0000 +++ inline_snapshot-0.31.1/docs/categories.md 2026-02-04 00:48:29.123486656 +0000 @@ -220,7 +220,7 @@ === "--inline-snapshot=update" - ``` python hl_lines="20 21 22 23 24 25 26 28 30" + ``` python hl_lines="20 21 22 23 24 26 28" from inline_snapshot import snapshot @@ -240,13 +240,11 @@ def test_something(): - assert "a\nb\nc\n" == snapshot( - """\ + assert "a\nb\nc\n" == snapshot("""\ a b c - """ - ) + """) assert 5 == snapshot(5) diff -urNP inline_snapshot-0.31.1.orig/docs/code_generation.md inline_snapshot-0.31.1/docs/code_generation.md --- inline_snapshot-0.31.1.orig/docs/code_generation.md 2020-02-02 00:00:00.000000000 +0000 +++ inline_snapshot-0.31.1/docs/code_generation.md 2026-02-04 00:48:29.123653689 +0000 @@ -86,17 +86,15 @@ === "--inline-snapshot=update" - ``` python hl_lines="6 7 8 9" + ``` python hl_lines="5 6 7 8" from inline_snapshot import snapshot def test_something(): - assert "first line\nsecond line" == snapshot( - """\ + assert "first line\nsecond line" == snapshot("""\ first line second line\ - """ - ) + """) ``` diff -urNP inline_snapshot-0.31.1.orig/docs/testing.md inline_snapshot-0.31.1/docs/testing.md --- inline_snapshot-0.31.1.orig/docs/testing.md 2020-02-02 00:00:00.000000000 +0000 +++ inline_snapshot-0.31.1/docs/testing.md 2026-02-04 00:48:29.123775181 +0000 @@ -29,32 +29,24 @@ Inline-snapshot will then populate the empty snapshots. -``` python hl_lines="17 18 19 20 21 22 23 24 25 26" +``` python hl_lines="7 11 13 14 15 16 17 18" from inline_snapshot.testing import Example from inline_snapshot import snapshot def test_something(): - Example( - { - "test_a.py": """\ + Example({"test_a.py": """\ from inline_snapshot import snapshot def test_a(): assert 1+1 == snapshot() -""" - } - ).run_pytest( # run with the create flag and check the changed files +"""}).run_pytest( # run with the create flag and check the changed files ["--inline-snapshot=create"], - changed_files=snapshot( - { - "test_a.py": """\ + changed_files=snapshot({"test_a.py": """\ from inline_snapshot import snapshot def test_a(): assert 1+1 == snapshot(2) -""" - } - ), +"""}), returncode=snapshot(1), ) ``` diff -urNP inline_snapshot-0.31.1.orig/tests/external/test_external.py inline_snapshot-0.31.1/tests/external/test_external.py --- inline_snapshot-0.31.1.orig/tests/external/test_external.py 2020-02-02 00:00:00.000000000 +0000 +++ inline_snapshot-0.31.1/tests/external/test_external.py 2026-02-04 00:56:12.137722889 +0000 @@ -1,6 +1,6 @@ import ast import sys -from pathlib import Path +from pathlib import Path, PosixPath from inline_snapshot import external from inline_snapshot import outsource @@ -375,7 +375,7 @@ storage="hash", stem="111*", suffix=".txt", - filename=Path("a.py"), + filename=PosixPath("a.py"), linenumber=1, ) ]