diff options
| -rw-r--r-- | .github/workflows/ci.yml | 3 | ||||
| -rw-r--r-- | tests/test_engine.py | 1 | ||||
| -rw-r--r-- | tests/test_exceptions.py | 3 |
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 | |||
| 66 | def test_serde(): | 67 | def 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 @@ | |||
| 1 | import adblock | 1 | import adblock |
| 2 | 2 | ||
| 3 | |||
| 3 | def test_correct_baseclasses(): | 4 | def 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) |
