~bialix/qbzr/code-layout

« back to all changes in this revision

Viewing changes to lib/tests/__init__.py

  • Committer: Alexander Belchenko
  • Date: 2009-12-16 20:48:14 UTC
  • mfrom: (1117.1.45 trunk)
  • Revision ID: bialix@ukr.net-20091216204814-g8nz4mvy6rg1kaov
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    global _qt_app
34
34
    if _qt_app is None:
35
35
        _qt_app = QtGui.QApplication(sys.argv)
36
 
 
 
36
    
37
37
    testmod_names = [
38
38
        'mock',
39
39
        'test_annotate',
40
40
        'test_autocomplete',
41
41
        'test_bugs',
 
42
        'test_cat',
42
43
        'test_commit_data',
43
44
        #'test_diffview', - broken by API changes
44
45
        'test_extra_isignored',
45
46
        'test_extra_isversioned',
46
47
        'test_i18n',
 
48
        'test_log',
47
49
        'test_loggraphprovider',
48
50
        'test_logmodel',
 
51
        'test_revisionmessagebrowser',
49
52
        'test_spellcheck',
50
53
        'test_subprocess',
51
54
        'test_tree_branch',
63
66
            else:
64
67
                raise
65
68
    return basic_tests
 
69
 
 
70
 
 
71
def replace_report_exception(test_case):
 
72
    import bzrlib.plugins.qbzr.lib.trace
 
73
    def report_exception(exc_info=None, type=None, window=None,
 
74
                         ui_mode=False):
 
75
        raise
 
76
    old_report_exception = bzrlib.plugins.qbzr.lib.trace.report_exception
 
77
    bzrlib.plugins.qbzr.lib.trace.report_exception = report_exception
 
78
    
 
79
    def restore_report_exception():
 
80
        bzrlib.plugins.qbzr.lib.trace.report_exception = old_report_exception
 
81
    
 
82
    test_case.addCleanup(restore_report_exception)
 
83