diff options
author | Guillaume Seguin <guillaume@segu.in> | 2008-08-22 18:04:04 +0200 |
---|---|---|
committer | Guillaume Seguin <guillaume@segu.in> | 2008-08-22 18:04:04 +0200 |
commit | 4f1c42056b26c8f13f5ddcc0e2f44213341a2e3b (patch) | |
tree | 0991eb57a4c0023590c570450d644838c6cf8369 | |
parent | eceb59e5a5073d44eca83eb1fabdee4c199e24bd (diff) | |
download | gmathlib-4f1c42056b26c8f13f5ddcc0e2f44213341a2e3b.tar.gz gmathlib-4f1c42056b26c8f13f5ddcc0e2f44213341a2e3b.tar.bz2 |
* Improve pyGMathView test to compare editor and normal modes
-rwxr-xr-x | test/test_pygmathview.py | 22 |
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) |