summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁrni Dagur <arni@dagur.eu>2021-06-26 18:52:22 +0000
committerÁrni Dagur <arni@dagur.eu>2021-06-26 19:10:50 +0000
commit822855b20a7864838084a813c457e2eb1f9570d5 (patch)
tree81f7c6745c802514458b9c41a3cd6a2eb4c0a4e9
parentfb1832feb868a81e2d10a1707c57df4623304313 (diff)
Run black code formatter
-rw-r--r--.github/workflows/ci.yml3
-rw-r--r--tests/test_engine.py1
-rw-r--r--tests/test_exceptions.py3
3 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dd8d8de..8113bdf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,6 +32,9 @@ jobs:
32 command: clippy 32 command: clippy
33 args: --all-targets --all-features 33 args: --all-targets --all-features
34 34
35 - name: Lint with Black
36 run: pip install black && black --check .
37
35 macos: 38 macos:
36 runs-on: macos-latest 39 runs-on: macos-latest
37 needs: lint 40 needs: lint
diff --git a/tests/test_engine.py b/tests/test_engine.py
index 8a7421c..6aa447f 100644
--- a/tests/test_engine.py
+++ b/tests/test_engine.py
@@ -63,6 +63,7 @@ def test_deserialize_corrupt(tmpdir):
63 with pytest.raises(adblock.DeserializationError): 63 with pytest.raises(adblock.DeserializationError):
64 engine.deserialize(b"abc") 64 engine.deserialize(b"abc")
65 65
66
66def test_serde(): 67def test_serde():
67 engine = empty_engine() 68 engine = empty_engine()
68 serialization_result = engine.serialize() 69 serialization_result = engine.serialize()
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py
index 497b3ef..becf107 100644
--- a/tests/test_exceptions.py
+++ b/tests/test_exceptions.py
@@ -1,5 +1,6 @@
1import adblock 1import adblock
2 2
3
3def test_correct_baseclasses(): 4def test_correct_baseclasses():
4 assert issubclass(adblock.AdblockException, Exception) 5 assert issubclass(adblock.AdblockException, Exception)
5 assert issubclass(adblock.BlockerException, adblock.AdblockException) 6 assert issubclass(adblock.BlockerException, adblock.AdblockException)
@@ -7,4 +8,4 @@ def test_correct_baseclasses():
7 assert issubclass(adblock.DeserializationError, adblock.BlockerException) 8 assert issubclass(adblock.DeserializationError, adblock.BlockerException)
8 assert issubclass(adblock.OptimizedFilterExistence, adblock.BlockerException) 9 assert issubclass(adblock.OptimizedFilterExistence, adblock.BlockerException)
9 assert issubclass(adblock.BadFilterAddUnsupported, adblock.BlockerException) 10 assert issubclass(adblock.BadFilterAddUnsupported, adblock.BlockerException)
10 assert issubclass(adblock.FilterExists, adblock.BlockerException) \ No newline at end of file 11 assert issubclass(adblock.FilterExists, adblock.BlockerException)