summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-08-22 18:04:04 +0200
committerGuillaume Seguin <guillaume@segu.in>2008-08-22 18:04:04 +0200
commit4f1c42056b26c8f13f5ddcc0e2f44213341a2e3b (patch)
tree0991eb57a4c0023590c570450d644838c6cf8369
parenteceb59e5a5073d44eca83eb1fabdee4c199e24bd (diff)
downloadgmathlib-4f1c42056b26c8f13f5ddcc0e2f44213341a2e3b.tar.gz
gmathlib-4f1c42056b26c8f13f5ddcc0e2f44213341a2e3b.tar.bz2
* Improve pyGMathView test to compare editor and normal modes
-rwxr-xr-xtest/test_pygmathview.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/test/test_pygmathview.py b/test/test_pygmathview.py
index d94e623..cdcec92 100755
--- a/test/test_pygmathview.py
+++ b/test/test_pygmathview.py
@@ -34,18 +34,16 @@ from pygmathlib_test_formula import make_test_formula
if __name__ == "__main__":
window = gtk.Window (gtk.WINDOW_TOPLEVEL)
window.set_title ("pyGMathView Test")
-
- mathview = gmathview.MathView ()
-
- mathview.set_editor_mode (True)
-
- context = mathview.get_context ()
-
- formula = make_test_formula (context)
-
- mathview.set_formula (formula)
-
- window.add (mathview)
+ vbox = gtk.VBox ()
+ window.add (vbox)
+
+ for editor in [True, False]:
+ mathview = gmathview.MathView ()
+ mathview.set_editor_mode (editor)
+ context = mathview.get_context ()
+ formula = make_test_formula (context)
+ mathview.set_formula (formula)
+ vbox.pack_start (mathview, False, False)
window.connect ("delete-event", gtk.main_quit)