@@ -488,9 +488,10 @@ class WidgetOutputsTestMixin:
488
488
_compare_selected_annotated_domains.
489
489
"""
490
490
491
- def init (self ):
491
+ def init (self , same_table_attributes = True ):
492
492
self .data = Table ("iris" )
493
493
self .same_input_output_domain = True
494
+ self .same_table_attributes = same_table_attributes
494
495
495
496
def test_outputs (self , timeout = DEFAULT_TIMEOUT ):
496
497
self .send_signal (self .signal_name , self .signal_data )
@@ -516,12 +517,14 @@ def test_outputs(self, timeout=DEFAULT_TIMEOUT):
516
517
self .same_input_output_domain )
517
518
np .testing .assert_array_equal (selected .X [:, :n_attr ],
518
519
self .data .X [selected_indices ])
519
- self .assertEqual (selected .attributes , self .data .attributes )
520
+ if self .same_table_attributes :
521
+ self .assertEqual (selected .attributes , self .data .attributes )
520
522
521
523
# check annotated data output
522
524
annotated = self .get_output (ANNOTATED_DATA_SIGNAL_NAME )
523
525
self .assertEqual (n_sel , np .sum ([i [feature_name ] for i in annotated ]))
524
- self .assertEqual (annotated .attributes , self .data .attributes )
526
+ if self .same_table_attributes :
527
+ self .assertEqual (annotated .attributes , self .data .attributes )
525
528
526
529
# compare selected and annotated data domains
527
530
self ._compare_selected_annotated_domains (selected , annotated )
0 commit comments