File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2929from Orange .widgets .utils .overlay import OverlayWidget
3030from Orange .widgets .utils .sql import check_sql_input
3131from Orange .widgets .utils .widgetpreview import WidgetPreview
32+ from Orange .widgets .utils .state_summary import format_summary_details
3233from Orange .widgets .widget import Input , Output
3334from Orange .preprocess import Normalize
3435from Orange .widgets .data .utils .preprocess import (
@@ -1265,7 +1266,7 @@ def set_data(self, data=None):
12651266 """Set the input dataset."""
12661267 self .data = data
12671268 if data is not None :
1268- self .info .set_input_summary (len (data ))
1269+ self .info .set_input_summary (len (data ), format_summary_details ( data ) )
12691270 else :
12701271 self .info .set_input_summary (self .info .NoInput )
12711272
@@ -1311,7 +1312,7 @@ def apply(self):
13111312 except (ValueError , ZeroDivisionError ) as e :
13121313 self .error (str (e ))
13131314 return
1314- self .info .set_output_summary (len (data ))
1315+ self .info .set_output_summary (len (data ), format_summary_details ( data ) )
13151316 else :
13161317 data = None
13171318 self .info .set_output_summary (self .info .NoOutput )
Original file line number Diff line number Diff line change 1212from Orange .widgets .data import owpreprocess
1313from Orange .widgets .data .owpreprocess import OWPreprocess , \
1414 UnivariateFeatureSelect , Scale as ScaleEditor
15+ from Orange .widgets .utils .state_summary import format_summary_details
1516from Orange .widgets .tests .base import WidgetTest , datasets
16- from orangewidget .widget import StateInfo
1717
1818
1919class TestOWPreprocess (WidgetTest ):
@@ -147,9 +147,10 @@ def test_summary(self):
147147 output_sum = self .widget .info .set_output_summary = Mock ()
148148
149149 self .send_signal (self .widget .Inputs .data , data )
150- input_sum .assert_called_with (int ( StateInfo . format_number ( len (data )) ))
150+ input_sum .assert_called_with (len (data ), format_summary_details ( data ))
151151 output = self .get_output (self .widget .Outputs .preprocessed_data )
152- output_sum .assert_called_with (int (StateInfo .format_number (len (output ))))
152+ output_sum .assert_called_with (len (output ),
153+ format_summary_details (output ))
153154
154155 input_sum .reset_mock ()
155156 output_sum .reset_mock ()
You can’t perform that action at this time.
0 commit comments