From 822855b20a7864838084a813c457e2eb1f9570d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Dagur?= Date: Sat, 26 Jun 2021 18:52:22 +0000 Subject: Run black code formatter --- .github/workflows/ci.yml | 3 +++ tests/test_engine.py | 1 + tests/test_exceptions.py | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) 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: command: clippy args: --all-targets --all-features + - name: Lint with Black + run: pip install black && black --check . + macos: runs-on: macos-latest 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): with pytest.raises(adblock.DeserializationError): engine.deserialize(b"abc") + def test_serde(): engine = empty_engine() 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 @@ import adblock + def test_correct_baseclasses(): assert issubclass(adblock.AdblockException, Exception) assert issubclass(adblock.BlockerException, adblock.AdblockException) @@ -7,4 +8,4 @@ def test_correct_baseclasses(): assert issubclass(adblock.DeserializationError, adblock.BlockerException) assert issubclass(adblock.OptimizedFilterExistence, adblock.BlockerException) assert issubclass(adblock.BadFilterAddUnsupported, adblock.BlockerException) - assert issubclass(adblock.FilterExists, adblock.BlockerException) \ No newline at end of file + assert issubclass(adblock.FilterExists, adblock.BlockerException) -- cgit v1.2.3