MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / testPatch

Method testPatch

src/Test/TestDiff.py:50–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 assert actions is False
49
50 def testPatch(self):
51 old_f = io.BytesIO(b"one\ntwo\nthree\nhmm\nsix")
52 new_f = io.BytesIO(b"one\ntwo\nthree\nfour\nfive\nsix")
53 actions = Diff.diff(
54 list(old_f),
55 list(new_f)
56 )
57 old_f.seek(0)
58 assert Diff.patch(old_f, actions).getvalue() == new_f.getvalue()

Callers

nothing calls this directly

Calls 1

seekMethod · 0.45

Tested by

no test coverage detected