MCPcopy
hub / github.com/saltstack/salt / update_module

Method update_module

tests/unit/test_loader.py:602–613  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

600 del cls.opts
601
602 def update_module(self):
603 self.count += 1
604 with salt.utils.files.fopen(self.module_path, "wb") as fh:
605 fh.write(
606 salt.utils.stringutils.to_bytes(
607 module_template.format(count=self.count)
608 )
609 )
610 fh.flush()
611 os.fsync(fh.fileno()) # flush to disk
612
613 # .pyc files are prevented by sys.dont_write_bytecode = True in setUp()
614
615 def rm_module(self):
616 os.unlink(self.module_path)

Callers 6

test_aliasMethod · 0.95
test_clearMethod · 0.95
test_loadMethod · 0.95
test__load__Method · 0.95
test_reloadMethod · 0.95

Calls 4

formatMethod · 0.80
writeMethod · 0.45
flushMethod · 0.45
filenoMethod · 0.45

Tested by

no test coverage detected