replace faulty coverage module with unittest and included libraries
Sonarqube Scanner / Build and analyze (push) Failing after 1m41s

This commit is contained in:
Florian Zumpe
2026-06-17 15:40:33 +02:00
parent 0b5c994957
commit 6a4d84ac6a
7 changed files with 218 additions and 118 deletions
+3 -3
View File
@@ -52,7 +52,6 @@ test('Python API tools are syntax-valid and contain reusable 401 authentication
const common = await read('tools/python/common.py');
const sonar = await read('sonar-project.properties');
const coverageRunner = await read('test-support/python_coverage_runner.py');
const requirements = await read('requirements-dev.txt');
const pkg = JSON.parse(await read('package.json'));
assert.match(common, /class ApiClient/);
assert.match(common, /error\.code != 401/);
@@ -67,10 +66,11 @@ test('Python API tools are syntax-valid and contain reusable 401 authentication
assert.match(pkg.scripts['test:coverage'], /test:coverage:python/);
assert.match(pkg.scripts['test:coverage:python'], /python_coverage_runner\.py/);
assert.match(coverageRunner, /coverage\/python\/coverage\.xml/);
assert.match(coverageRunner, /--target/);
assert.match(coverageRunner, /import trace/);
assert.match(coverageRunner, /xml\.etree\.ElementTree/);
assert.doesNotMatch(coverageRunner, /-m[', ]+pip|requirements-dev|python-test-deps/);
assert.match(coverageRunner, /traceback\.print_exc/);
assert.match(sonar, /sonar\.python\.coverage\.reportPaths=coverage\/python\/coverage\.xml/);
assert.match(requirements, /^coverage==/m);
});