/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_crash.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-02-09 10:44:18 UTC
  • mfrom: (5652.1.3 thread-with-exception)
  • Revision ID: pqm@pqm.ubuntu.com-20110209104418-n3058l06ehubtl9a
(vila) Moves CatchingExceptionThread out of the bzrlib.tests hierarchy.
 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
26
26
    config,
27
27
    crash,
28
28
    osutils,
29
 
    symbol_versioning,
 
29
    plugin,
30
30
    tests,
31
31
    )
32
32
 
40
40
    def test_apport_report(self):
41
41
        crash_dir = osutils.joinpath((self.test_base_dir, 'crash'))
42
42
        os.mkdir(crash_dir)
43
 
        os.environ['APPORT_CRASH_DIR'] = crash_dir
 
43
        self.overrideEnv('APPORT_CRASH_DIR', crash_dir)
44
44
        self.assertEquals(crash_dir, config.crash_dir())
45
45
 
 
46
        self.overrideAttr(
 
47
            plugin,
 
48
            'plugin_warnings',
 
49
            {'example': ['Failed to load plugin foo']})
 
50
 
46
51
        stderr = StringIO()
47
52
 
48
53
        try:
72
77
        self.assertContainsRe(report, 'test_apport_report')
73
78
        # should also be in there
74
79
        self.assertContainsRe(report, '(?m)^CommandLine:')
 
80
        self.assertContainsRe(
 
81
            report,
 
82
            'Failed to load plugin foo')