testinggtk r130 - trunk/tests/pango
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r130 - trunk/tests/pango
- Date: Sun, 15 Jun 2008 03:50:09 +0000 (UTC)
Author: bjornl
Date: Sun Jun 15 03:50:09 2008
New Revision: 130
URL: http://svn.gnome.org/viewvc/testinggtk?rev=130&view=rev
Log:
Tests for the pango.Context class
Added:
trunk/tests/pango/test_context.py
Added: trunk/tests/pango/test_context.py
==============================================================================
--- (empty file)
+++ trunk/tests/pango/test_context.py Sun Jun 15 03:50:09 2008
@@ -0,0 +1,19 @@
+'''
+Tests for the ``pango.Context`` class.
+'''
+import gtk
+import pango
+
+def test_widget_default_attributes():
+ '''
+ Tests the default attributes of a ``pango.Context`` created from a
+ ``gtk.Widget`` using ``create_pango_context``.
+ '''
+ ctx = gtk.Label().create_pango_context()
+ assert ctx.get_base_dir() == pango.DIRECTION_LTR
+ lang = ctx.get_language()
+ # yeah..
+ assert lang.to_string() == 'sv-se'
+ fd = ctx.get_font_description()
+ assert fd.get_family() == 'Verdana'
+ assert fd.get_size() / pango.SCALE == 10
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]