MCPcopy Index your code
hub / github.com/StackStorm/st2 / write_files

Function write_files

pants-plugins/sample_conf/rules_test.py:119–137  ·  view source on GitHub ↗
(
    sample_conf_dir: str,
    sample_conf_file: str,
    before: str,
    after: str,
    rule_runner: RuleRunner,
)

Source from the content-addressed store, hash-verified

117
118
119def write_files(
120 sample_conf_dir: str,
121 sample_conf_file: str,
122 before: str,
123 after: str,
124 rule_runner: RuleRunner,
125) -> None:
126 files = {
127 f"{sample_conf_dir}/{sample_conf_file}": before,
128 f"{sample_conf_dir}/BUILD": f"sample_conf(name='t', source='{sample_conf_file}')",
129 # add in the target that's hard-coded in the generate_sample_conf_via_fmt rue
130 f"{ConfigGen.directory}/{ConfigGen.script}.py": SCRIPT_PY.format(
131 sample_conf_text=after
132 ),
133 f"{ConfigGen.directory}/__init__.py": "",
134 f"{ConfigGen.directory}/BUILD": "python_sources()",
135 }
136
137 rule_runner.write_files(files)
138
139
140def test_changed(rule_runner: RuleRunner) -> None:

Callers 2

test_changedFunction · 0.70
test_unchangedFunction · 0.70

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected