summaryrefslogtreecommitdiff
path: root/tests/test_exceptions.py
diff options
context:
space:
mode:
authorÁrni Dagur <arni@dagur.eu>2021-06-26 16:20:29 +0000
committerÁrni Dagur <arni@dagur.eu>2021-06-26 19:10:50 +0000
commitfb1832feb868a81e2d10a1707c57df4623304313 (patch)
treef77f31d340f19b0e4d96a92ccc23cdeb6b135738 /tests/test_exceptions.py
parent0d5c8b8cfa1025c29b96db3c52ff54a7d204923f (diff)
Create a custom exception type for this library
Diffstat (limited to 'tests/test_exceptions.py')
-rw-r--r--tests/test_exceptions.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py
new file mode 100644
index 0000000..497b3ef
--- /dev/null
+++ b/tests/test_exceptions.py
@@ -0,0 +1,10 @@
1import adblock
2
3def test_correct_baseclasses():
4 assert issubclass(adblock.AdblockException, Exception)
5 assert issubclass(adblock.BlockerException, adblock.AdblockException)
6 assert issubclass(adblock.SerializationError, adblock.BlockerException)
7 assert issubclass(adblock.DeserializationError, adblock.BlockerException)
8 assert issubclass(adblock.OptimizedFilterExistence, adblock.BlockerException)
9 assert issubclass(adblock.BadFilterAddUnsupported, adblock.BlockerException)
10 assert issubclass(adblock.FilterExists, adblock.BlockerException) \ No newline at end of file