}
def test_coverage_raw(self) -> None:
build_root = get_buildroot()
with temporary_dir(root_dir=build_root) as tmpdir:
tmpdir_relative = self._prepare_sources(tmpdir, build_root)
result = self._run_tests(tmpdir_relative, "--coverage-py-report=raw")
self._assert_raw_coverage(result, build_root)
After Change
with self.setup_tmpdir(self.sources) as tmpdir:
result = self.run_coverage(tmpdir, "--coverage-py-report=raw")
assert "Wrote raw coverage report to `dist/coverage/python`" in result.stderr
coverage_data = Path(get_buildroot(), "dist", "coverage", "python", ".coverage")
assert coverage_data.exists() is True
conn = sqlite3.connect(coverage_data.as_posix())
cursor = conn.cursor()
cursor.execute("SELECT name FROM sqlite_master WHERE type="table"")
assert {row[0] for row in cursor.fetchall()} == {
"arc",
"context",