/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: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 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
 
    plugin,
 
29
    symbol_versioning,
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
 
        self.overrideEnv('APPORT_CRASH_DIR', crash_dir)
 
43
        os.environ['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
 
 
51
46
        stderr = StringIO()
52
47
 
53
48
        try:
77
72
        self.assertContainsRe(report, 'test_apport_report')
78
73
        # should also be in there
79
74
        self.assertContainsRe(report, '(?m)^CommandLine:')
80
 
        self.assertContainsRe(
81
 
            report,
82
 
            'Failed to load plugin foo')