def test_params_constructor(self, simple_adjustment):
     """Make sure the widget can be set up via constructor."""
     spin = HamsterSpinButton(simple_adjustment)
     adjustment = spin.get_adjustment()
     assert adjustment.get_lower() == simple_adjustment.min
     assert adjustment.get_upper() == simple_adjustment.max
     assert adjustment.get_step_increment() == simple_adjustment.step
Esempio n. 2
0
 def test_params_constructor(self, simple_adjustment):
     """Make sure the widget can be set up via constructor."""
     spin = HamsterSpinButton(simple_adjustment)
     adjustment = spin.get_adjustment()
     assert adjustment.get_lower() == simple_adjustment.min
     assert adjustment.get_upper() == simple_adjustment.max
     assert adjustment.get_step_increment() == simple_adjustment.step
 def test_params_constructor_adjustment(self, adjustment):
     """Make sure the widget can be set up by passing :class:`Gtk.Adjustment` to constructor."""
     spin = HamsterSpinButton(adjustment)
     assert spin.get_adjustment() == adjustment
Esempio n. 4
0
 def test_params_constructor_adjustment(self, adjustment):
     """Make sure the widget can be set up by passing :class:`Gtk.Adjustment` to constructor."""
     spin = HamsterSpinButton(adjustment)
     assert spin.get_adjustment() == adjustment