From cb1054f8415ec2915da2fd217eabc926794b1cfb Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 25 Feb 2023 16:18:07 +0100 Subject: [PATCH] Fix formatting in tests Apply black to tests. --- tests/conftest.py | 2 -- tests/test_keyring.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index fc530b5..26db9af 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -167,7 +167,6 @@ def create_key_revocation( def decorator(decorated_func: Callable[..., None]) -> Callable[..., Any]: @wraps(decorated_func) def wrapper(working_dir: Path, *args: Any, **kwargs: Any) -> None: - revocation = test_key_revocation[username][0] keyring_root: Path = working_dir / "keyring" @@ -199,7 +198,6 @@ def create_signature_revocation( def decorator(decorated_func: Callable[..., None]) -> Callable[..., Any]: @wraps(decorated_func) def wrapper(working_dir: Path, *args: Any, **kwargs: Any) -> None: - issuer_key: Path = test_keys[issuer][0] keyring_root: Path = working_dir / "keyring" diff --git a/tests/test_keyring.py b/tests/test_keyring.py index 752f04d..3f3716d 100644 --- a/tests/test_keyring.py +++ b/tests/test_keyring.py @@ -640,7 +640,6 @@ def test_get_packets_from_path(working_dir: Path, keyring_dir: Path, path_exists @mark.parametrize("path_exists", [(True), (False)]) @patch("libkeyringctl.keyring.get_packets_from_path") def test_get_packets_from_listing(get_packets_from_path_mock: Mock, working_dir: Path, path_exists: bool) -> None: - path = working_dir / "path" if not path_exists: assert keyring.get_packets_from_listing(path=path) == [] @@ -704,7 +703,6 @@ def test_derive_username_from_fingerprint( keyring_dir: Path, valid_fingerprint: str, ) -> None: - username = "username" other_username = "other_user" @@ -791,7 +789,6 @@ def test_inspect_keyring(working_dir: Path, keyring_dir: Path) -> None: def test_get_fingerprints_from_paths(keyring_dir: Path, valid_fingerprint: str, valid_subkey_fingerprint: str) -> None: - fingerprint_dir = keyring_dir / "type" / "username" / valid_fingerprint fingerprint_dir.mkdir(parents=True) (fingerprint_dir / (fingerprint_dir.name + ".asc")).touch()