MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / assertFileContainsData

Method assertFileContainsData

app/atomic_file_test.py:35–39  ·  view source on GitHub ↗
(self, path, data_expected)

Source from the content-addressed store, hash-verified

33 # unittest.TestCase assert methods.
34 # pylint: disable=invalid-name
35 def assertFileContainsData(self, path, data_expected):
36 self.assertTrue(os.path.exists(path))
37 with open(path, 'rb') as file:
38 data_actual = file.read()
39 self.assertEqual(data_expected, data_actual)
40
41 # Ignore pylint because we want to have naming consistent with other
42 # unittest.TestCase assert methods.

Calls

no outgoing calls

Tested by

no test coverage detected