Skip to content

Commit

Permalink
fix: run_inline
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed May 26, 2024
1 parent 26b4a06 commit cc7b746
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
10 changes: 5 additions & 5 deletions tests/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ def run_inline(
snapshot._change()
all_changes += snapshot._changes()

if reported_flags is not None:
assert sorted(snapshot_flags) == reported_flags
if reported_flags is not None:
assert sorted(snapshot_flags) == reported_flags

if changes is not None:
assert [c for c in all_changes] == changes
# if changes is not None:
# assert all_changes == changes

recorder.fix_all()
recorder.fix_all()

if changed_files is not None:
current_files = {}
Expand Down
16 changes: 0 additions & 16 deletions tests/test_example.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
from executing import Source

from .example import Example
from inline_snapshot import HasRepr
from inline_snapshot import snapshot
from inline_snapshot._change import Replace


def test_example():
Expand All @@ -27,18 +23,6 @@ def test_a():
e.run_inline(
"fix",
reported_flags=snapshot(["fix"]),
changes=snapshot(
[
Replace(
flag="fix",
source=HasRepr(Source, "<source test_a.py>"),
node="Constant(value=2)",
new_code="1",
old_value=2,
new_value=1,
)
]
),
).run_inline(
"fix",
changed_files=snapshot({}),
Expand Down

0 comments on commit cc7b746

Please sign in to comment.