Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 2, 2024
1 parent 6a8bc13 commit 27d56d0
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions tests/algorithms/sorting_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
from nrw.datastructures import ComparableContentT, List


@pytest.fixture()
@pytest.fixture
def empty_list() -> List[int]:
return List()


@pytest.fixture()
@pytest.fixture
def sorted_list() -> List[int]:
lst: List[int] = List()
lst.append(1)
Expand All @@ -33,7 +33,7 @@ def sorted_list() -> List[int]:
return lst


@pytest.fixture()
@pytest.fixture
def unsorted_list() -> List[int]:
lst: List[int] = List()
lst.append(3)
Expand Down
4 changes: 2 additions & 2 deletions tests/algorithms/traversal_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from nrw.datastructures import List


@pytest.fixture()
@pytest.fixture
def bst() -> BinarySearchTree[int]:
tree: BinarySearchTree[int] = BinarySearchTree()
tree.insert(5)
Expand All @@ -25,7 +25,7 @@ def bst() -> BinarySearchTree[int]:
return tree


@pytest.fixture()
@pytest.fixture
def binary_tree() -> BinaryTree[int]:
tree: BinaryTree[int] = BinaryTree()
tree.content = 5
Expand Down
2 changes: 1 addition & 1 deletion tests/database/msaccess_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from pathlib import Path


@pytest.fixture()
@pytest.fixture
def msaccess_db(tmp_path: Path) -> Iterator[str]:
test_db: Path = tmp_path / "test.accdb"
test_db.touch()
Expand Down
4 changes: 2 additions & 2 deletions tests/datastructures/binary_search_tree_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from nrw.datastructures._binary_search_tree import _BSTNode


@pytest.fixture()
@pytest.fixture
def empty_bst() -> BinarySearchTree[int]:
return BinarySearchTree()


@pytest.fixture()
@pytest.fixture
def sample_bst() -> BinarySearchTree[int]:
bst: BinarySearchTree[int] = BinarySearchTree()
bst._node = _BSTNode(1)
Expand Down
2 changes: 1 addition & 1 deletion tests/datastructures/edge_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from nrw.datastructures import Edge, Vertex


@pytest.fixture()
@pytest.fixture
def sample_edge() -> Edge:
vertex_a: Vertex = Vertex("A")
vertex_b: Vertex = Vertex("B")
Expand Down
2 changes: 1 addition & 1 deletion tests/datastructures/graph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from nrw.datastructures import Edge, Graph, List, Vertex


@pytest.fixture()
@pytest.fixture
def graph() -> Graph:
return Graph()

Expand Down
6 changes: 3 additions & 3 deletions tests/datastructures/list_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
from nrw.datastructures._list import _ListNode


@pytest.fixture()
@pytest.fixture
def sample_node() -> _ListNode[int]:
return _ListNode(1)


@pytest.fixture()
@pytest.fixture
def empty_list() -> List[int]:
return List()


@pytest.fixture()
@pytest.fixture
def sample_list() -> List[int]:
lst: List[int] = List()
lst.append(1)
Expand Down
14 changes: 7 additions & 7 deletions tests/network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def process_message(self, message: str) -> None:
assert message == "Hello to you"


@pytest.mark.networktest()
@pytest.mark.networktest
def test_connection_without_running_server() -> None:
conn: Connection = Connection(LOCALHOST, random_port())
conn.send("Hello")
assert conn.receive() is None
conn.close()


@pytest.mark.networktest()
@pytest.mark.networktest
def test_client_without_running_server() -> None:
client: HelloClient = HelloClient(LOCALHOST, random_port())
assert not client.is_connected
Expand All @@ -74,7 +74,7 @@ def test_client_without_running_server() -> None:
assert not client.is_connected


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_connection_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port=port)
Expand All @@ -92,7 +92,7 @@ def test_close_connection_first() -> None:
assert not server.is_open


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_server_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port=port)
Expand All @@ -110,7 +110,7 @@ def test_close_server_first() -> None:
assert not server.is_open


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_client_connection_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port)
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_close_client_connection_first() -> None:
assert not client.is_connected


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_server_connection_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port)
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_close_server_connection_first() -> None:
assert not client.is_connected


@pytest.mark.networktest()
@pytest.mark.networktest
def test_server_with_two_connected_clients() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port)
Expand Down

0 comments on commit 27d56d0

Please sign in to comment.