MCPcopy Create free account
hub / github.com/saltstack/salt / write

Method write

tests/support/xmlunit.py:50–64  ·  view source on GitHub ↗
(self, b)

Source from the content-addressed store, hash-verified

48 self._second.writelines(lines)
49
50 def write(self, b):
51 if isinstance(self._first, io.TextIOBase):
52 wrote = self._first.write(b)
53
54 if wrote is not None:
55 # expected to always succeed to write
56 self._second.write(b[:wrote])
57
58 return wrote
59 else:
60 # file-like object in Python2
61 # It doesn't return wrote bytes.
62 self._first.write(b)
63 self._second.write(b)
64 return len(b)
65
66 def fileno(self):
67 return self._first.fileno()

Callers 15

setUpMethod · 0.45
test_add_dirMethod · 0.45
test_add_fileMethod · 0.45
test_commitMethod · 0.45
test_rebaseMethod · 0.45
test_stashMethod · 0.45
test_statusMethod · 0.45
setUpMethod · 0.45
restore_shadow_fileMethod · 0.45
test_cache_local_fileMethod · 0.45

Calls

no outgoing calls

Tested by 15

setUpMethod · 0.36
test_add_dirMethod · 0.36
test_add_fileMethod · 0.36
test_commitMethod · 0.36
test_rebaseMethod · 0.36
test_stashMethod · 0.36
test_statusMethod · 0.36
setUpMethod · 0.36
restore_shadow_fileMethod · 0.36
test_cache_local_fileMethod · 0.36