From 89d529895a21c40d1e3f3913b02540f32ab9a0b9 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 3 Nov 2018 19:29:00 -0400 Subject: Debug-time environment variables can be set with set_env.py --- coverage/parser.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'coverage/parser.py') diff --git a/coverage/parser.py b/coverage/parser.py index 6faa36e2..6ae81c19 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -491,6 +491,7 @@ new_contract('ArcStarts', lambda seq: all(isinstance(x, ArcStart) for x in seq)) # Turn on AST dumps with an environment variable. +# $set_env.py: COVERAGE_AST_DUMP - Dump the AST nodes when parsing code. AST_DUMP = bool(int(os.environ.get("COVERAGE_AST_DUMP", 0))) class NodeList(object): @@ -535,6 +536,7 @@ class AstArcAnalyzer(object): self.missing_arc_fragments = collections.defaultdict(list) self.block_stack = [] + # $set_env.py: COVERAGE_TRACK_ARCS - Trace every arc added while parsing code. self.debug = bool(int(os.environ.get("COVERAGE_TRACK_ARCS", 0))) def analyze(self): -- cgit v1.2.1