MCPcopy Index your code
hub / github.com/python/cpython / write

Method write

Lib/test/test_importlib/test_util.py:793–797  ·  view source on GitHub ↗
(fd, data)

Source from the content-addressed store, hash-verified

791
792 # Emulate an os.write that only writes partial data.
793 def write(fd, data):
794 if self.seen_write and self.never_complete:
795 return None
796 self.seen_write = True
797 return oldwrite(fd, data[:self.truncate_at_length])
798
799 # Need to patch _io to be _pyio, so that io.FileIO is affected by the
800 # os.write patch.

Callers 15

test_circular_importsMethod · 0.45
rewrite_fileMethod · 0.45
submoduleFunction · 0.45
temp_moduleFunction · 0.45
create_modulesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected