MCPcopy Index your code
hub / github.com/geldata/gel / test_cqa_rust_rustfmt

Method test_cqa_rust_rustfmt

tests/test_sourcecode.py:137–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135 f'clippy validation failed:\n{output}') from None
136
137 def test_cqa_rust_rustfmt(self):
138 edgepath = find_edgedb_root()
139 config_path = os.path.join(edgepath, 'Cargo.toml')
140 if not os.path.exists(config_path):
141 raise RuntimeError('could not locate Cargo.toml file')
142
143 try:
144 subprocess.run(
145 [
146 "cargo",
147 'fmt',
148 '--check',
149 ],
150 check=True,
151 stdout=subprocess.PIPE,
152 stderr=subprocess.PIPE,
153 cwd=edgepath,
154 )
155 except subprocess.CalledProcessError as ex:
156 output = ex.stdout.decode()
157 if ex.stderr:
158 output += '\n\n' + ex.stderr.decode()
159 raise AssertionError(
160 f'rustfmt validation failed:\n{output}') from None

Callers

nothing calls this directly

Calls 3

find_edgedb_rootFunction · 0.70
runMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected