File: testenv.py

package info (click to toggle)
python-coverage 7.6.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,120 kB
  • sloc: python: 30,196; ansic: 1,181; javascript: 773; makefile: 293; sh: 107; xml: 48
file content (26 lines) | stat: -rw-r--r-- 830 bytes parent folder | download | duplicates (2)
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
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt

"""Environment settings affecting tests."""

from __future__ import annotations

import os

# Are we testing the C-implemented trace function?
C_TRACER = os.getenv("COVERAGE_CORE", "ctrace") == "ctrace"

# Are we testing the Python-implemented trace function?
PY_TRACER = os.getenv("COVERAGE_CORE", "ctrace") == "pytrace"

# Are we testing the sys.monitoring implementation?
SYS_MON = os.getenv("COVERAGE_CORE", "ctrace") == "sysmon"

# Are we using a settrace function as a core?
SETTRACE_CORE = C_TRACER or PY_TRACER

# Are plugins supported during these tests?
PLUGINS = C_TRACER

# Are dynamic contexts supported during these tests?
DYN_CONTEXTS = C_TRACER or PY_TRACER