view tests/sitecustomize.py @ 44096:e598c874b4af

tests: stabilize test-subrepo-svn.t on Windows This partially reverts 991e4404e910, because the URL form of `C:\...` gets escaped to `C%3A/...`, which breaks the substitution of $TESTTMP. The forget command on 'notafile*' errored out with: notafile*: The filename, directory name, or volume label syntax is incorrect which I think is because '*' isn't a legal character in a file name (though I can't trigger this directly from MSYS or cmd.exe for some reason). Differential Revision: https://phab.mercurial-scm.org/D7816
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 28 Dec 2019 12:25:16 -0500
parents 2372284d9457
children 6000f5b25c9b
line wrap: on
line source

from __future__ import absolute_import
import os

if os.environ.get('COVERAGE_PROCESS_START'):
    try:
        import coverage
        import uuid

        covpath = os.path.join(
            os.environ['COVERAGE_DIR'], 'cov.%s' % uuid.uuid1()
        )
        cov = coverage.coverage(data_file=covpath, auto_data=True)
        cov._warn_no_data = False
        cov._warn_unimported_source = False
        cov.start()
    except ImportError:
        pass