DebugClients/Python3/coverage/env.py

Wed, 04 Nov 2015 16:25:25 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 04 Nov 2015 16:25:25 +0100
changeset 4543
2e6a880670e9
parent 4489
d0d6e4ad31bd
permissions
-rw-r--r--

Fixed a few code style issues (forgotten future imports, copyrights,...).
(grafted from e8ddd9d76414329dc056f4d6ee712bc6847af049)

# 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?
# Even when running tests, you can use COVERAGE_TESTING=0 to disable the
# test-specific behavior like contracts.
TESTING = os.getenv('COVERAGE_TESTING', '') == 'True'

eric ide

mercurial