File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,12 @@ def test_its():
375375    )
376376    assert  isinstance (df , pd .DataFrame )
377377    assert  isinstance (result , cp .InterruptedTimeSeries )
378+     assert  result .pre_impact .shape [1 ] ==  len (result .treated_units ), (
379+         "Mismatch between pre_impact shape and number of treated units" 
380+     )
381+     assert  result .post_impact .shape [1 ] ==  len (result .treated_units ), (
382+         "Mismatch between post_impact shape and number of treated units" 
383+     )
378384    assert  len (result .idata .posterior .coords ["chain" ]) ==  sample_kwargs ["chains" ]
379385    assert  len (result .idata .posterior .coords ["draw" ]) ==  sample_kwargs ["draws" ]
380386    result .summary ()
Original file line number Diff line number Diff line change @@ -109,6 +109,12 @@ def test_its():
109109    )
110110    assert  isinstance (df , pd .DataFrame )
111111    assert  isinstance (result , cp .InterruptedTimeSeries )
112+     assert  result .pre_impact .shape [1 ] ==  len (result .treated_units ), (
113+         "Mismatch between pre_impact shape and number of treated units" 
114+     )
115+     assert  result .post_impact .shape [1 ] ==  len (result .treated_units ), (
116+         "Mismatch between post_impact shape and number of treated units" 
117+     )
112118    result .summary ()
113119    fig , ax  =  result .plot ()
114120    assert  isinstance (fig , plt .Figure )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments