File: test_exception.py

package info (click to toggle)
reportbug 13.2.0
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,248 kB
  • sloc: python: 9,838; sh: 70; makefile: 41; lisp: 31
file content (46 lines) | stat: -rw-r--r-- 1,508 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import unittest

from reportbug import exceptions


class TestExceptions(unittest.TestCase):

    def test_raises_reportbug_exception(self):
        with self.assertRaises(exceptions.reportbug_exception):
            raise exceptions.reportbug_exception

    def test_raises_reportbug_ui_exception(self):
        with self.assertRaises(exceptions.reportbug_ui_exception):
            raise exceptions.reportbug_ui_exception

    def test_raises_UINotImportable(self):
        with self.assertRaises(exceptions.UINotImportable):
            raise exceptions.UINotImportable

    def test_raises_NoPackage(self):
        with self.assertRaises(exceptions.NoPackage):
            raise exceptions.NoPackage

    def test_raises_NoBugs(self):
        with self.assertRaises(exceptions.NoBugs):
            raise exceptions.NoBugs

    def test_raises_NoReport(self):
        with self.assertRaises(exceptions.NoReport):
            raise exceptions.NoReport

    def test_raises_UINotImplemented(self):
        with self.assertRaises(exceptions.UINotImplemented):
            raise exceptions.UINotImplemented

    def test_raises_NoNetwork(self):
        with self.assertRaises(exceptions.NoNetwork):
            raise exceptions.NoNetwork

    def test_raises_InvalidRegex(self):
        with self.assertRaises(exceptions.InvalidRegex):
            raise exceptions.InvalidRegex

    def test_raises_NoMessage(self):
        with self.assertRaises(exceptions.NoMessage):
            raise exceptions.NoMessage