(self)
| 75 | f'ruff validation failed:\n{output}') from None |
| 76 | |
| 77 | def test_cqa_mypy(self): |
| 78 | edgepath = find_edgedb_root() |
| 79 | config_path = os.path.join(edgepath, 'pyproject.toml') |
| 80 | if not os.path.exists(config_path): |
| 81 | raise RuntimeError('could not locate pyproject.toml file') |
| 82 | |
| 83 | try: |
| 84 | import mypy # NoQA |
| 85 | except ImportError: |
| 86 | raise unittest.SkipTest('mypy module is missing') |
| 87 | |
| 88 | for subdir in ['edb', 'tests']: # ignore any top-level test files |
| 89 | try: |
| 90 | subprocess.run( |
| 91 | [ |
| 92 | sys.executable, |
| 93 | '-m', |
| 94 | 'mypy', |
| 95 | '--config-file', |
| 96 | config_path, |
| 97 | subdir, |
| 98 | ], |
| 99 | check=True, |
| 100 | stdout=subprocess.PIPE, |
| 101 | stderr=subprocess.PIPE, |
| 102 | cwd=edgepath, |
| 103 | ) |
| 104 | except subprocess.CalledProcessError as ex: |
| 105 | output = ex.stdout.decode() |
| 106 | if ex.stderr: |
| 107 | output += '\n\n' + ex.stderr.decode() |
| 108 | raise AssertionError( |
| 109 | f'mypy validation failed:\n{output}') from None |
| 110 | |
| 111 | def test_cqa_rust_clippy(self): |
| 112 | edgepath = find_edgedb_root() |
nothing calls this directly
no test coverage detected