blob: 1d2846c6da257bb65871df8533f9a81a34b6adb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Determine facts about the environment."""
import os
import sys
# Operating systems.
WINDOWS = sys.platform == "win32"
LINUX = sys.platform == "linux2"
# Python implementations.
PYPY = '__pypy__' in sys.builtin_module_names
# Python versions.
PYVERSION = sys.version_info
PY2 = PYVERSION < (3, 0)
PY3 = PYVERSION >= (3, 0)
# Coverage.py specifics.
# Are we using the C-implemented trace function?
C_TRACER = os.getenv('COVERAGE_TEST_TRACER', 'c') == 'c'
# Are we coverage-measuring ourselves?
METACOV = os.getenv('COVERAGE_COVERAGE', '') != ''
# Are we running our test suite?
TESTING = os.getenv('COVERAGE_TESTING', '') != ''
|