def test_debug_exporter_maybe_enable_buttons( scrollbar_value, scrolbar_maximum, is_enabled): de = DebugExporter(None) fake_scrollbar = Mock() fake_scrollbar.maximum = Mock(return_value=scrolbar_maximum) de.scrollbar = fake_scrollbar de.maybe_enable_buttons(scrollbar_value) assert de.copy_button.isEnabled() == is_enabled
def test_debug_exporter_maybe_enable_buttons_on_resizeEvent(): de = DebugExporter(None) de.maybe_enable_buttons = Mock() de.resizeEvent(None) assert de.maybe_enable_buttons.call_args[0][0] == de.scrollbar.value()