MCPcopy
hub / github.com/geldata/gel / test_cqa_rust_clippy

Method test_cqa_rust_clippy

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

Source from the content-addressed store, hash-verified

109 f'mypy validation failed:\n{output}') from None
110
111 def test_cqa_rust_clippy(self):
112 edgepath = find_edgedb_root()
113 config_path = os.path.join(edgepath, 'Cargo.toml')
114 if not os.path.exists(config_path):
115 raise RuntimeError('could not locate Cargo.toml file')
116
117 try:
118 subprocess.run(
119 [
120 "cargo",
121 'clippy',
122 '--',
123 '-Dclippy::all',
124 ],
125 check=True,
126 stdout=subprocess.PIPE,
127 stderr=subprocess.PIPE,
128 cwd=edgepath,
129 )
130 except subprocess.CalledProcessError as ex:
131 output = ex.stdout.decode()
132 if ex.stderr:
133 output += '\n\n' + ex.stderr.decode()
134 raise AssertionError(
135 f'clippy validation failed:\n{output}') from None
136
137 def test_cqa_rust_rustfmt(self):
138 edgepath = find_edgedb_root()

Callers

nothing calls this directly

Calls 3

find_edgedb_rootFunction · 0.70
runMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected