MCPcopy Create free account
hub / github.com/StackStorm/st2 / get_snapshot

Function get_snapshot

pants-plugins/api_spec/rules_test.py:149–154  ·  view source on GitHub ↗
(rule_runner: RuleRunner, source_files: dict[str, str])

Source from the content-addressed store, hash-verified

147
148# copied from pantsbuild/pants.git/src/python/pants/backend/python/lint/black/rules_integration_test.py
149def get_snapshot(rule_runner: RuleRunner, source_files: dict[str, str]) -> Snapshot:
150 files = [
151 FileContent(path, content.encode()) for path, content in source_files.items()
152 ]
153 digest = rule_runner.request(Digest, [CreateDigest(files)])
154 return rule_runner.request(Snapshot, [digest])
155
156
157# add dummy script at st2common/st2common/cmd/generate_api_spec.py that the test can load.

Callers 2

test_generate_changedFunction · 0.70
test_generate_unchangedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected