File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,8 @@ def run_tests_with_coverage(tracer, *runner_args):
163163    os .environ ['COVERAGE_HOME' ] =  os .getcwd ()
164164    context  =  os .environ .get ('COVERAGE_CONTEXT' )
165165    if  context :
166+         if  context [0 ] ==  "$" :
167+             context  =  os .environ [context [1 :]]
166168        os .environ ['COVERAGE_CONTEXT' ] =  context  +  "."  +  tracer 
167169
168170    # Create the .pth file that will let us measure coverage in sub-processes. 
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ source =
1616    ${COVERAGE_HOME-.}/tests
1717#  $set_env.py: COVERAGE_DYNCTX - Set to 'test_function' for who-tests-what
1818dynamic_context  = ${COVERAGE_DYNCTX-none}
19- #  $set_env.py: COVERAGE_CONTEXT - Set to a static  context for this run
19+ #  $set_env.py: COVERAGE_CONTEXT - Static  context for this run (or $ENV_VAR like $TOX_ENV_NAME) 
2020context  = ${COVERAGE_CONTEXT-none}
2121
2222[report] 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments