Mercurial > hg-stable
changeset 30486:d2c40510104e
tests: update sitecustomize to use uuid1() instead of randrange()
The comments mention that uuid would be better, so let's go ahead and
make good on an old idea.
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 21 Nov 2016 17:51:39 -0500 |
parents | 8a9681b963a3 |
children | f7d66746ec18 |
files | tests/sitecustomize.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/sitecustomize.py Mon Nov 21 17:48:13 2016 -0500 +++ b/tests/sitecustomize.py Mon Nov 21 17:51:39 2016 -0500 @@ -4,11 +4,10 @@ if os.environ.get('COVERAGE_PROCESS_START'): try: import coverage - import random + import uuid - # uuid is better, but not available in Python 2.4. covpath = os.path.join(os.environ['COVERAGE_DIR'], - 'cov.%s' % random.randrange(0, 1000000000000)) + 'cov.%s' % uuid.uuid1()) cov = coverage.coverage(data_file=covpath, auto_data=True) cov._warn_no_data = False cov._warn_unimported_source = False