[Reportbug-commits] [reportbug] 03/04: Drop test() and __main__() from Urwid UI file

Sandro Tosi morph at moszumanska.debian.org
Mon May 4 04:08:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit 4268ce991aa74ffe518fd3510214f0e76dca6a0e
Author: Sandro Tosi <morph at debian.org>
Date:   Sat May 2 21:54:33 2015 -0400

    Drop test() and __main__() from Urwid UI file
    
    They were used to test the UI, but they are broken, and now we should use the
    unittest suite instead.
---
 reportbug/ui/urwid_ui.py | 37 +------------------------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/reportbug/ui/urwid_ui.py b/reportbug/ui/urwid_ui.py
index 81bade3..4020cbc 100644
--- a/reportbug/ui/urwid_ui.py
+++ b/reportbug/ui/urwid_ui.py
@@ -656,39 +656,4 @@ def initialize ():
     return True
 
 def can_input():
-    return sys.stdin.isatty()
-
-def test():
-    import time
-
-    fp = sys.stdout
-
-    long_message('This is a test.  This is only a test.\nPlease do not adjust your set.')
-    time.sleep(1)
-##     output = get_string('Tell me your name, biatch.')
-##     print >> fp, output
-##     output = get_multiline('List all of your aliases now.')
-##     print >> fp, output
-##     result = select_options('This is really lame', 'ynM', {
-##         'y' : 'You bet', 'n' : 'Never!', 'm' : 'Maybe'})
-##     print >> fp, result
-##     yn = yes_no('Do you like green eggs and ham?', 'Yes sireee', 'No way!')
-##     print >> fp, yn
-
-    mailers = [(x, '') for x in reportbug.MUA.keys()]
-    mailers.sort()
-    mailer = menu('Choose a mailer for your report', mailers,
-                  'Select mailer: ', default='mutt', empty_ok=True)
-    print >> fp, mailer
-
-    import debbugs
-
-    tags = debbugs.get_tags()
-
-    taglist = select_multiple(
-        'Do any of the following apply to this report?', tags,
-        'Please select tags: ')
-    print >> fp, taglist
-
-if __name__ == '__main__':
-    test()
+    return sys.stdin.isatty()
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list