biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.85k stars 1.01k forks source link

Test whether widget error, warnings and messages are derived from base classes #3977

Closed janezd closed 5 years ago

janezd commented 5 years ago

https://github.com/biolab/orange3-network/issues/120 was caused by improper derivation of warnings:

class OWNxExplorer(OWDataProjectionWidget):
   ...
   class Warning(widget.OWWidget.Warning):
      ...

The base class for widget tests, WidgetTest, could include a test that first determines the widget's direct parent (OWWidgte or the base class that is derived from OWWidget), and then asserts that the widget's Error, Warning and Information are derived from base class' Error, Warning and Information.

janezd commented 5 years ago

Implemented via https://github.com/biolab/orange-widget-base/pull/9.