MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / test_to_file

Method test_to_file

functional/test/test_streams.py:261–270  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

259 pass
260
261 def test_to_file(self):
262 tmp_path = "functional/test/data/tmp/output.txt"
263 sequence = self.seq(1, 2, 3, 4)
264 sequence.to_file(tmp_path)
265 with open(tmp_path, "r") as output:
266 self.assertEqual("[1, 2, 3, 4]", output.readlines()[0])
267
268 sequence.to_file(tmp_path, delimiter=":")
269 with open(tmp_path, "r") as output:
270 self.assertEqual("1:2:3:4", output.readlines()[0])
271
272 def test_to_file_compressed(self):
273 tmp_path = "functional/test/data/tmp/output.txt"

Callers

nothing calls this directly

Calls 1

to_fileMethod · 0.80

Tested by

no test coverage detected