testinggtk r116 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r116 - trunk/tests
- Date: Sun, 8 Jun 2008 21:54:43 +0000 (UTC)
Author: bjornl
Date: Sun Jun 8 21:54:43 2008
New Revision: 116
URL: http://svn.gnome.org/viewvc/testinggtk?rev=116&view=rev
Log:
Move module-level docstrings to the top of the file, before the import statements. This allows epydoc to find them
Modified:
trunk/tests/test_button.py
trunk/tests/test_calendar.py
trunk/tests/test_cellrenderercombo.py
trunk/tests/test_cellrenderertext.py
trunk/tests/test_combobox.py
trunk/tests/test_comboboxentry.py
trunk/tests/test_dragcontext.py
trunk/tests/test_expander.py
trunk/tests/test_filechooserdialog.py
trunk/tests/test_filechooserwidget.py
trunk/tests/test_gdk_keys.py
trunk/tests/test_hbox.py
trunk/tests/test_imagemenuitem.py
trunk/tests/test_liststore.py
trunk/tests/test_menuitem.py
trunk/tests/test_notebook.py
trunk/tests/test_paned.py
trunk/tests/test_pixbuf_loading.py
trunk/tests/test_pixmap.py
trunk/tests/test_print_dialog_unix.py
trunk/tests/test_print_settings.py
trunk/tests/test_progress.py
trunk/tests/test_range.py
trunk/tests/test_scrolledwindow.py
trunk/tests/test_socket.py
trunk/tests/test_statusicon.py
trunk/tests/test_style.py
trunk/tests/test_textbuffer.py
trunk/tests/test_toolbar.py
trunk/tests/test_toolbutton.py
trunk/tests/test_toolitem.py
trunk/tests/test_treemodelfilter.py
trunk/tests/test_treestore.py
trunk/tests/test_widget.py
trunk/tests/utils.py
Modified: trunk/tests/test_button.py
==============================================================================
--- trunk/tests/test_button.py (original)
+++ trunk/tests/test_button.py Sun Jun 8 21:54:43 2008
@@ -1,10 +1,9 @@
-import gtk
-from gtk import gdk
-import utils
-
'''
Tests for the ``gtk.Button`` class.
'''
+import gtk
+from gtk import gdk
+import utils
def test_set_get_use_stock():
'''
Modified: trunk/tests/test_calendar.py
==============================================================================
--- trunk/tests/test_calendar.py (original)
+++ trunk/tests/test_calendar.py Sun Jun 8 21:54:43 2008
@@ -1,10 +1,9 @@
-import gtk
-from datetime import date
-import utils
-
'''
Tests for the ``gtk.Calendar`` class.
'''
+import gtk
+from datetime import date
+import utils
def test_calendar_year_overflowing():
'''
Modified: trunk/tests/test_cellrenderercombo.py
==============================================================================
--- trunk/tests/test_cellrenderercombo.py (original)
+++ trunk/tests/test_cellrenderercombo.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-from gtk import gdk
-
'''
Tests for the ``gtk.CellRendererCombo`` class.
'''
+import gtk
+from gtk import gdk
def test_default_attributes():
cr = gtk.CellRendererCombo()
Modified: trunk/tests/test_cellrenderertext.py
==============================================================================
--- trunk/tests/test_cellrenderertext.py (original)
+++ trunk/tests/test_cellrenderertext.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-from gtk import gdk
-
'''
Tests for the ``gtk.CellRendererText`` class.
'''
+import gtk
+from gtk import gdk
def test_default_attributes():
cr = gtk.CellRendererText()
Modified: trunk/tests/test_combobox.py
==============================================================================
--- trunk/tests/test_combobox.py (original)
+++ trunk/tests/test_combobox.py Sun Jun 8 21:54:43 2008
@@ -1,10 +1,10 @@
+'''
+Tests for the ``gtk.ComboBox`` class.
+'''
import atk
import gtk
import utils
-'''
-Tests for the ``gtk.ComboBox`` class.
-'''
def test_default_attributes():
combo = gtk.ComboBox()
assert combo.get_wrap_width() == 0
Modified: trunk/tests/test_comboboxentry.py
==============================================================================
--- trunk/tests/test_comboboxentry.py (original)
+++ trunk/tests/test_comboboxentry.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-import utils
-
'''
Tests for the ``gtk.ComboBoxEntry`` class.
'''
+import gtk
+import utils
@utils.pass_on_warnings
def test_from_model_index_out_of_bounds():
Modified: trunk/tests/test_dragcontext.py
==============================================================================
--- trunk/tests/test_dragcontext.py (original)
+++ trunk/tests/test_dragcontext.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-from gtk import gdk
-import utils
-
'''
Tests for the ``gtk.gdk.DragContext`` class.
'''
+from gtk import gdk
+import utils
def test_drag_get_selection():
'''
Modified: trunk/tests/test_expander.py
==============================================================================
--- trunk/tests/test_expander.py (original)
+++ trunk/tests/test_expander.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.Expander`` widget.
'''
+import gtk
def test_default_properties():
expander = gtk.Expander()
Modified: trunk/tests/test_filechooserdialog.py
==============================================================================
--- trunk/tests/test_filechooserdialog.py (original)
+++ trunk/tests/test_filechooserdialog.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,9 @@
-import gc
-import gtk
-
'''
Tests for the gtk.FileChooserDialog class.
'''
+import gc
+import gtk
+
def test_default_action():
'''
Ensure that the default action is
Modified: trunk/tests/test_filechooserwidget.py
==============================================================================
--- trunk/tests/test_filechooserwidget.py (original)
+++ trunk/tests/test_filechooserwidget.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gc
-import gtk
-
'''
Tests for the ``gtk.FileChooserWidget`` class.
'''
+import gc
+import gtk
def test_iterating_using_foreach_and_gc():
'''
Modified: trunk/tests/test_gdk_keys.py
==============================================================================
--- trunk/tests/test_gdk_keys.py (original)
+++ trunk/tests/test_gdk_keys.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-from gtk import gdk
-
'''
Tests for the ``gdk.keyval_to_unicode`` and ``gdk.unicode_to_keyval``
functions.
'''
+from gtk import gdk
latin1range = range(0x20, 0x7e + 1) + range(0xa0, 0xff + 1)
Modified: trunk/tests/test_hbox.py
==============================================================================
--- trunk/tests/test_hbox.py (original)
+++ trunk/tests/test_hbox.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-import utils
-
'''
Tests for the ``gtk.HBox`` class.
'''
+import gtk
+import utils
@utils.pass_on_warnings
def test_add_widget_twice():
Modified: trunk/tests/test_imagemenuitem.py
==============================================================================
--- trunk/tests/test_imagemenuitem.py (original)
+++ trunk/tests/test_imagemenuitem.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.ImageMenuItem`` class.
'''
+import gtk
def test_default_attributes():
item = gtk.ImageMenuItem()
Modified: trunk/tests/test_liststore.py
==============================================================================
--- trunk/tests/test_liststore.py (original)
+++ trunk/tests/test_liststore.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.ListStore`` class.
'''
+import gtk
def test_iter_in_empty_store():
liststore = gtk.ListStore(str)
Modified: trunk/tests/test_menuitem.py
==============================================================================
--- trunk/tests/test_menuitem.py (original)
+++ trunk/tests/test_menuitem.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,9 @@
-import gtk
-import utils
-
'''
Tests for the ``gtk.MenuItem`` class.
'''
+import gtk
+import utils
+
def test_default_attributes():
mi = gtk.MenuItem()
assert not mi.get_submenu()
Modified: trunk/tests/test_notebook.py
==============================================================================
--- trunk/tests/test_notebook.py (original)
+++ trunk/tests/test_notebook.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,8 @@
-import gtk
-
'''
Tests for the ``gtk.Notebook`` class.
'''
+import gtk
+
def test_default_attributes():
'''
Test that checks the default values in ``gtk.Notebook``.
Modified: trunk/tests/test_paned.py
==============================================================================
--- trunk/tests/test_paned.py (original)
+++ trunk/tests/test_paned.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the gtk.HPaned and gtk.VPaned classes.
'''
+import gtk
DIVIDER_SIZE = 6
Modified: trunk/tests/test_pixbuf_loading.py
==============================================================================
--- trunk/tests/test_pixbuf_loading.py (original)
+++ trunk/tests/test_pixbuf_loading.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-from gtk import gdk
-
'''
Tests for loading ``gdk.Pixbuf`` objects from data.
'''
+from gtk import gdk
def test_load_from_xpm():
'''
Modified: trunk/tests/test_pixmap.py
==============================================================================
--- trunk/tests/test_pixmap.py (original)
+++ trunk/tests/test_pixmap.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,9 @@
-from gtk import gdk
-import utils
-
'''
Tests for the ``gtk.gdk.Pixmap`` class.
'''
+from gtk import gdk
+import utils
+
@utils.pass_on_warnings
def test_none_drawable_no_depth():
'''
Modified: trunk/tests/test_print_dialog_unix.py
==============================================================================
--- trunk/tests/test_print_dialog_unix.py (original)
+++ trunk/tests/test_print_dialog_unix.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtkunixprint
-import utils
-
'''
Tests for the ``gtkunixprint.PrintUnixDialog`` class.
'''
+import gtkunixprint
+import utils
def test_current_page_number():
'''
Modified: trunk/tests/test_print_settings.py
==============================================================================
--- trunk/tests/test_print_settings.py (original)
+++ trunk/tests/test_print_settings.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,8 @@
-import gtk
-
'''
Tests for the ``gtk.PrintSettings`` class.
'''
+import gtk
+
def test_default_values():
'''
Ensure that the default values of ``gtk.PrintSettings``
Modified: trunk/tests/test_progress.py
==============================================================================
--- trunk/tests/test_progress.py (original)
+++ trunk/tests/test_progress.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Test for the deprecated ``gtk.Progress`` class.
'''
+import gtk
def test_format_string_overflow():
'''
Modified: trunk/tests/test_range.py
==============================================================================
--- trunk/tests/test_range.py (original)
+++ trunk/tests/test_range.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-from gtk import gdk
-
'''
Tests for the ``gtk.Range`` class.
'''
+import gtk
+from gtk import gdk
def test_default_properties():
range = gtk.HScrollbar()
Modified: trunk/tests/test_scrolledwindow.py
==============================================================================
--- trunk/tests/test_scrolledwindow.py (original)
+++ trunk/tests/test_scrolledwindow.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.ScrolledWindow`` class.
'''
+import gtk
def test_default_adjustments():
'''
Modified: trunk/tests/test_socket.py
==============================================================================
--- trunk/tests/test_socket.py (original)
+++ trunk/tests/test_socket.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,8 @@
-import gtk
-
'''
Tests for the ``gtk.Socket`` class.
'''
+import gtk
+
def test_realize():
'''
Realizing a ``gtk.Socket`` should set a flag in its flags.
Modified: trunk/tests/test_statusicon.py
==============================================================================
--- trunk/tests/test_statusicon.py (original)
+++ trunk/tests/test_statusicon.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.StatusIcon`` class.
'''
+import gtk
def test_default_values():
icon = gtk.StatusIcon()
Modified: trunk/tests/test_style.py
==============================================================================
--- trunk/tests/test_style.py (original)
+++ trunk/tests/test_style.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.Style`` class.
'''
+import gtk
def test_default_style():
'''
Modified: trunk/tests/test_textbuffer.py
==============================================================================
--- trunk/tests/test_textbuffer.py (original)
+++ trunk/tests/test_textbuffer.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,7 @@
-import gtk
-
'''
Tests for the ``gtk.TextBuffer`` class.
'''
+import gtk
def test_end_iter():
buffer = gtk.TextBuffer()
Modified: trunk/tests/test_toolbar.py
==============================================================================
--- trunk/tests/test_toolbar.py (original)
+++ trunk/tests/test_toolbar.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-import utils
-
'''
Tests for the ``gtk.Toolbar`` class.
'''
+import gtk
+import utils
def test_style_property():
toolbar = gtk.Toolbar()
Modified: trunk/tests/test_toolbutton.py
==============================================================================
--- trunk/tests/test_toolbutton.py (original)
+++ trunk/tests/test_toolbutton.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gobject
-import gtk
-
'''
Tests for the ``gtk.ToolButton`` class.
'''
+import gobject
+import gtk
def test_empty_toolbutton():
tb = gtk.ToolButton()
Modified: trunk/tests/test_toolitem.py
==============================================================================
--- trunk/tests/test_toolitem.py (original)
+++ trunk/tests/test_toolitem.py Sun Jun 8 21:54:43 2008
@@ -1,8 +1,8 @@
-import gtk
-
'''
Tests for the ``gtk.ToolItem`` class.
'''
+import gtk
+
def test_toolbar_style():
'''
Ensure that the toolitem notices changes in its toolbars style.
Modified: trunk/tests/test_treemodelfilter.py
==============================================================================
--- trunk/tests/test_treemodelfilter.py (original)
+++ trunk/tests/test_treemodelfilter.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-import utils
-
'''
Tests for the ``gtk.TreeModelFilter`` class.
'''
+import gtk
+import utils
def test_iterator_in_visible_func():
'''
Modified: trunk/tests/test_treestore.py
==============================================================================
--- trunk/tests/test_treestore.py (original)
+++ trunk/tests/test_treestore.py Sun Jun 8 21:54:43 2008
@@ -1,9 +1,8 @@
-import gtk
-import utils
-
'''
Tests for the ``gtk.TreeStore`` class.
'''
+import gtk
+import utils
@utils.fail_on_warnings
def test_insert_in_filtered_tree():
Modified: trunk/tests/test_widget.py
==============================================================================
--- trunk/tests/test_widget.py (original)
+++ trunk/tests/test_widget.py Sun Jun 8 21:54:43 2008
@@ -2,7 +2,6 @@
Tests for the ``gtk.Widget`` class. Since that class is abstract,
subclasses of it is used in these tests.
'''
-
import gtk
import utils
Modified: trunk/tests/utils.py
==============================================================================
--- trunk/tests/utils.py (original)
+++ trunk/tests/utils.py Sun Jun 8 21:54:43 2008
@@ -1,13 +1,12 @@
+'''
+Useful utils usable under unit testing.
+'''
import functools
import gtk
import StringIO
import sys
import time
-'''
-Useful utils usable under unit testing.
-'''
-
class WarningChecker:
def __init__(self):
self.stderr = sys.stderr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]