Skip to content

Get coverage as percentage #503

Open
@nedbat

Description

@nedbat

Originally reported by controversial (Bitbucket: controversial, GitHub: controversial)


I'm using the command-line API to measure coverage as part of my testing script. I'd like, however, to be able to get the coverage over all files as a single number from my Coverage object.

I spent a while poking through some objects and the source. I found the coverage.results.Numbers class, but after measuring my coverage with the Python API, I can't find a way to get an instance of this class.


Metadata

Metadata

Assignees

No one assigned

    Labels

    apiChanges to the public APIenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions