ruff fixed formatting
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
"""Integration tests for ConnectionAwareInterface."""
|
||||
|
||||
import pytest
|
||||
from python_repositories.interfaces.connection_aware_interface import ConnectionAwareInterface
|
||||
from python_repositories.interfaces.connection_aware_interface import (
|
||||
ConnectionAwareInterface,
|
||||
)
|
||||
|
||||
|
||||
def test_instantiation_fails_when_connect_not_implemented() -> None:
|
||||
"""Test that instantiation fails if connect is not implemented."""
|
||||
|
||||
class Incomplete(ConnectionAwareInterface):
|
||||
"""A class that does not implement connect."""
|
||||
|
||||
def disconnect(self) -> None:
|
||||
pass
|
||||
|
||||
@@ -21,8 +25,10 @@ def test_instantiation_fails_when_connect_not_implemented() -> None:
|
||||
|
||||
def test_instantiation_fails_when_disconnect_not_implemented() -> None:
|
||||
"""Test that instantiation fails if disconnect is not implemented."""
|
||||
|
||||
class Incomplete(ConnectionAwareInterface):
|
||||
"""A class that does not implement disconnect."""
|
||||
|
||||
def connect(self) -> None:
|
||||
pass
|
||||
|
||||
@@ -36,8 +42,10 @@ def test_instantiation_fails_when_disconnect_not_implemented() -> None:
|
||||
|
||||
def test_instantiation_fails_when_is_connected_not_implemented() -> None:
|
||||
"""Test that instantiation fails if is_connected is not implemented."""
|
||||
|
||||
class Incomplete(ConnectionAwareInterface):
|
||||
"""A class that does not implement is_connected."""
|
||||
|
||||
def connect(self) -> None:
|
||||
pass
|
||||
|
||||
@@ -50,8 +58,10 @@ def test_instantiation_fails_when_is_connected_not_implemented() -> None:
|
||||
|
||||
def test_connect_raises_not_implemented_if_not_overwritten() -> None:
|
||||
"""Test that connect raises NotImplementedError if not implemented."""
|
||||
|
||||
class Incomplete(ConnectionAwareInterface):
|
||||
"""A class that does not implement connect."""
|
||||
|
||||
def connect(self) -> None:
|
||||
super().connect() # type: ignore
|
||||
|
||||
@@ -69,8 +79,10 @@ def test_connect_raises_not_implemented_if_not_overwritten() -> None:
|
||||
|
||||
def test_disconnect_raises_not_implemented_if_not_overwritten() -> None:
|
||||
"""Test that disconnect raises NotImplementedError if not implemented."""
|
||||
|
||||
class Incomplete(ConnectionAwareInterface):
|
||||
"""A class that does not implement disconnect."""
|
||||
|
||||
def connect(self) -> None:
|
||||
pass
|
||||
|
||||
@@ -88,8 +100,10 @@ def test_disconnect_raises_not_implemented_if_not_overwritten() -> None:
|
||||
|
||||
def test_is_connected_raises_not_implemented_if_not_overwritten() -> None:
|
||||
"""Test that is_connected raises NotImplementedError if not implemented."""
|
||||
|
||||
class Incomplete(ConnectionAwareInterface):
|
||||
"""A class that does not implement is_connected."""
|
||||
|
||||
def connect(self) -> None:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user