MCPcopy
hub / github.com/GoSecure/pyrdp / test_finalize_removesDuplicates

Method test_finalize_removesDuplicates

test/test_FileMapping.py:56–62  ·  view source on GitHub ↗
(self, *_)

Source from the content-addressed store, hash-verified

54 @patch("pathlib.Path.symlink_to")
55 @patch("pathlib.Path.mkdir")
56 def test_finalize_removesDuplicates(self, *_):
57 mapping, *_ = self.createMapping()
58 mapping.write(b"data")
59
60 with patch("pathlib.Path.unlink", autospec=True) as mock_unlink:
61 mapping.finalize()
62 self.assertTrue(any(args[0][0] == mapping.dataPath for args in mock_unlink.call_args_list))
63
64 @patch("pathlib.Path.unlink")
65 @patch("pathlib.Path.exists", new_callable=lambda: Mock(return_value=False))

Callers

nothing calls this directly

Calls 3

createMappingMethod · 0.95
writeMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected