File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -921,7 +921,7 @@ def repr_val(self, val):
921921 return '?'
922922 if not self .have_date and not self .have_time :
923923 # The time is relative, unitless. The value is absolute.
924- return str (val )
924+ return str (val . value ) if isinstance ( val , Value ) else str ( val )
925925
926926 # If you know how to simplify this, be my guest
927927 seconds = int (val )
Original file line number Diff line number Diff line change @@ -382,6 +382,10 @@ def test_readwrite_timevariable(self):
382382 self .assertEqual (input_csv .getvalue ().splitlines (),
383383 output_csv .getvalue ().splitlines ())
384384
385+ def test_repr_value (self ):
386+ # https://github.com/biolab/orange3/pull/1760
387+ var = TimeVariable ('time' )
388+ self .assertEqual (var .repr_val (Value (var , 416.3 )), '416.3' )
385389
386390
387391PickleContinuousVariable = create_pickling_tests (
You can’t perform that action at this time.
0 commit comments