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

Method test_cqa_ruff

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

Source from the content-addressed store, hash-verified

54 f'{fn} must be an empty file (except Python comments)')
55
56 def test_cqa_ruff(self):
57 edgepath = find_edgedb_root()
58
59 try:
60 import ruff # NoQA
61 except ImportError:
62 raise unittest.SkipTest('ruff module is missing')
63
64 for subdir in ['edb', 'tests']: # ignore any top-level test files
65 try:
66 subprocess.run(
67 ['ruff', 'check', '.'],
68 check=True,
69 stdout=subprocess.PIPE,
70 stderr=subprocess.PIPE,
71 cwd=os.path.join(edgepath, subdir))
72 except subprocess.CalledProcessError as ex:
73 output = ex.output.decode()
74 raise AssertionError(
75 f'ruff validation failed:\n{output}') from None
76
77 def test_cqa_mypy(self):
78 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