def make_data_file(
        self,
        basename: str | None = None,
        *,
        suffix: str | None = None,
        lines: Mapping[str, Collection[TLineNo]] | None = None,
        arcs: Mapping[str, Collection[TArc]] | None = None,
        file_tracers: Mapping[str, str] | None = None,
    ) -> CoverageData:
        """Write some data into a coverage data file."""
        data = coverage.CoverageData(basename=basename, suffix=suffix)
        assert lines is None or arcs is None
        if lines:
            data.add_lines(lines)
        if arcs:
            data.add_arcs(arcs)
        if file_tracers:
            data.add_file_tracers(file_tracers)
        data.write()
        return data
Write some data into a coverage data file.
tests/coveragetest.py