diff options
author | Manuel QuiƱones <manuq@laptop.org> | 2012-08-22 09:57:54 -0300 |
---|---|---|
committer | Sergey V. Udaltsov <svu@gnome.org> | 2012-08-24 23:52:44 +0100 |
commit | 6f424f697916155e4aef5a4b16b83d192222de7f (patch) | |
tree | 193b044ac91117fa38b9ae167ec0c540c8b50c61 | |
parent | 182ed66a0913937584638290dd2d0c9acd67d2a7 (diff) | |
download | libxklavier-6f424f697916155e4aef5a4b16b83d192222de7f.tar.gz |
Add testcase for ConfigRec.set_model in test_gi.py
Signed-off-by: Manuel QuiƱones <manuq@laptop.org>
-rwxr-xr-x | tests/test_gi.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py index 3e6f654..a7337d1 100755 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -103,3 +103,30 @@ print(' Layouts:', rec.layouts) print(' Variants:', rec.variants) print(' Options:', rec.options) +print('Changing model to "pc105"...') +original_model = rec.model +rec.set_model("pc105") + +print('Curent configuration:') +rec = Xkl.ConfigRec() +if not rec.get_from_server(engine): + print('Failed to get configuration from server') + sys.exit(1) +print(' Model:', rec.model) +print(' Layouts:', rec.layouts) +print(' Variants:', rec.variants) +print(' Options:', rec.options) + +print('Changing back to original model...') +rec.set_model(original_model) + +print('Curent configuration:') +rec = Xkl.ConfigRec() +if not rec.get_from_server(engine): + print('Failed to get configuration from server') + sys.exit(1) +print(' Model:', rec.model) +print(' Layouts:', rec.layouts) +print(' Variants:', rec.variants) +print(' Options:', rec.options) + |