def test_debug_exporter_on_checkbox_state_changed_toggle_content( checkbox_state, expected_content): de = DebugExporter(None) de.log_loader.content = "unfiltered" de.log_loader.filtered_content = "filtered" de.on_checkbox_state_changed(checkbox_state) assert de.plaintextedit.toPlainText() == expected_content
def test_debug_exporter_on_checkbox_state_changed_keep_scrollbar_position(): de = DebugExporter(None) fake_scrollbar = Mock() fake_scrollbar.value = Mock(return_value=99) fake_setValue = Mock() fake_scrollbar.setValue = fake_setValue de.scrollbar = fake_scrollbar de.on_checkbox_state_changed(0) assert de.scrollbar.setValue.call_args[0][0] == 99