/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 breezy/tests/test_crash.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
        # message explaining the crash
59
59
        self.assertContainsRe(stderr.getvalue(),
60
 
            "    apport-bug %s" % crash_filename)
 
60
                              "    apport-bug %s" % crash_filename)
61
61
 
62
62
        with open(crash_filename) as crash_file:
63
63
            report = crash_file.read()
64
64
 
65
65
        self.assertContainsRe(report,
66
 
            '(?m)^BrzVersion:') # should be in the traceback
 
66
                              '(?m)^BrzVersion:')  # should be in the traceback
67
67
        self.assertContainsRe(report, 'my error')
68
68
        self.assertContainsRe(report, 'AssertionError')
69
69
        # see https://bugs.launchpad.net/bzr/+bug/528114
97
97
            crash.report_bug_legacy(sys.exc_info(), err_file)
98
98
        report = err_file.getvalue()
99
99
        for needle in [
100
 
            "brz: ERROR: AssertionError: my error",
101
 
            r"Traceback \(most recent call last\):",
102
 
            r"plugins: fake_plugin\[1\.2\.3\]",
103
 
            ]:
 
100
                "brz: ERROR: AssertionError: my error",
 
101
                r"Traceback \(most recent call last\):",
 
102
                r"plugins: fake_plugin\[1\.2\.3\]",
 
103
                ]:
104
104
            self.assertContainsRe(report, needle)