Browse Source

move tests from GTK+ UI module to the its test file (commented, they are there just as reference)

suites/jessie-proposed-backports
Sandro Tosi 10 years ago
parent
commit
f7bd274a54
  1. 15
      reportbug/ui/gtk2_ui.py
  2. 15
      test/test_ui_gtk2.py

15
reportbug/ui/gtk2_ui.py

@ -1544,18 +1544,3 @@ Falling back to 'text' interface."""
def can_input ():
return True
def test ():
# Write some tests here
print get_password ("test")
print select_options ('test', 'A', {'a': 'A test'})
print get_multiline ('ENTER', empty_ok=True)
print get_string ("test")
print system ("yes")
page = HandleBTSQueryPage (assistant)
application.run_once_in_main_thread (page.execute_operation, [('test', (Bug ('#123 [test] [we] we we Reported by: test;' ), Bug ('#123 [test] [we] we we Reported by: test;')))], 'test')
return application.get_last_value ()
if __name__ == '__main__':
initialize ()
test ()

15
test/test_ui_gtk2.py

@ -27,3 +27,18 @@ class TestUIGTK2(unittest2.TestCase):
for item in gtk_bug:
self.assertIsNotNone(item)
# These tests were written in the main module,
# moved here to see if they can be interested somehow,
# but to use them, we'd need to find a way to interact
# programmatically with the GTK+ widgets
#def test ():
# # Write some tests here
# print get_password ("test")
# print select_options ('test', 'A', {'a': 'A test'})
# print get_multiline ('ENTER', empty_ok=True)
# print get_string ("test")
# print system ("yes")
# page = HandleBTSQueryPage (assistant)
# application.run_once_in_main_thread (page.execute_operation, [('test', (Bug ('#123 [test] [we] we we Reported by: test;' ), Bug ('#123 [test] [we] we we Reported by: test;')))], 'test')
# return application.get_last_value ()

Loading…
Cancel
Save