MCPcopy
hub / github.com/StevenBlack/hosts / test_write_basic

Method test_write_basic

testUpdateHostsFile.py:1770–1779  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1768
1769class TestWriteData(Base):
1770 def test_write_basic(self):
1771 f = BytesIO()
1772
1773 data = "foo"
1774 write_data(f, data)
1775
1776 expected = b"foo"
1777 actual = f.getvalue()
1778
1779 self.assertEqual(actual, expected)
1780
1781 def test_write_unicode(self):
1782 f = BytesIO()

Callers

nothing calls this directly

Calls 1

write_dataFunction · 0.90

Tested by

no test coverage detected