A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://coverage.readthedocs.io/en/7.2.0/api_module.html below:

Website Navigation


coverage module — Coverage.py 7.2.0 documentation

coverage module

The most important thing in the coverage module is the coverage.Coverage class, described in The Coverage class, but there are a few other things also.

coverage.version_info

A tuple of five elements, similar to sys.version_info: major, minor, micro, releaselevel, and serial. All values except releaselevel are integers; the release level is 'alpha', 'beta', 'candidate', or 'final'. Unlike sys.version_info, the elements are not available by name.

coverage.__version__

A string with the version of coverage.py, for example, "5.0b2".

class coverage.CoverageException

The base class of all exceptions raised by Coverage.py.

Starting coverage.py automatically

This function is used to start coverage measurement automatically when Python starts. See Measuring sub-processes for details.

coverage.process_startup()

Call this at Python start-up to perhaps measure coverage.

If the environment variable COVERAGE_PROCESS_START is defined, coverage measurement is started. The value of the variable is the config file to use.

There are two ways to configure your Python installation to invoke this function when Python starts:

  1. Create or append to sitecustomize.py to add these lines:

    import coverage
    coverage.process_startup()
    
  2. Create a .pth file in your Python installation containing:

    import coverage; coverage.process_startup()
    

Returns the Coverage instance that was started, or None if it was not started by this call.

Return type:

Optional[Coverage]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4