1
# Copyright (C) 2010 Canonical Ltd
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
This is a basic test to verify that mago-ng is working as expected and can
20
be run with various testing framework
23
$ mago-ng <path_to_this_file>
25
You can code ldtp directly in there or an external module
26
The only mandatory element is 'launcher' (and window_name for now)
28
set setupOnce to False to launch/close the app for each test
30
The purpose of this example is to test the __guesswindowname() from the
33
This test is DEPRECATED and replaced by test_getwindowname
36
from mago import TestCase
39
class TestGuess(TestCase):
40
"""The minimal test that can be written with mago
43
#window_name = 'frmKlondike'
45
@skip('This test is deprecated and replaced by test_getwindowname')
46
def test_guesswindowname(self):
47
"""Launch the application and use TestCase.__guesswindowname() to
48
find out the name of the main application that has just been launched
51
#windowname = self.window_name
52
self.assertEqual(self.application.window_name, 'frmKlondike')
54
if __name__ == "__main__":