testinggtk r166 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r166 - trunk/tests
- Date: Fri, 20 Jun 2008 21:53:50 +0000 (UTC)
Author: bjornl
Date: Fri Jun 20 21:53:49 2008
New Revision: 166
URL: http://svn.gnome.org/viewvc/testinggtk?rev=166&view=rev
Log:
Test for converting widget to bin_window coords
Modified:
trunk/tests/test_treeview.py
Modified: trunk/tests/test_treeview.py
==============================================================================
--- trunk/tests/test_treeview.py (original)
+++ trunk/tests/test_treeview.py Fri Jun 20 21:53:49 2008
@@ -85,6 +85,23 @@
view = gtk.TreeView()
assert not view.get_path_at_pos(0, 0)
+def test_convert_widget_to_bin_window_coords():
+ '''
+ Test converting widget to bin_window coordinates on an unrealized
+ window.
+ '''
+ view = gtk.TreeView()
+ for wx, wy in (0, 0), (100, 100), (-10, 3), (99, -99):
+ view.set_headers_visible(False)
+ bx, by = view.convert_widget_to_bin_window_coords(wx, wy)
+ assert wx == bx
+ assert wy == by
+
+ view.set_headers_visible(True)
+ bx, by = view.convert_widget_to_bin_window_coords(wx, wy)
+ assert wx == bx
+ assert wy == by + 1
+
def test_set_none_adjustments():
'''
Ensure that setting the adjustments to None throws TypeError.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]