(self)
| 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() |
nothing calls this directly
no test coverage detected