From f1e1bc6910e3361a547aa0536577ba1f1229df56 Mon Sep 17 00:00:00 2001 From: Clemens Borys Date: Sun, 6 Jun 2021 22:25:05 +0200 Subject: [PATCH] Remove unused imports, unused variables --- server/matchmaker/algorithm/random_newbies.py | 2 +- tests/unit_tests/test_matchmaker_algorithm_stable_marriage.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/matchmaker/algorithm/random_newbies.py b/server/matchmaker/algorithm/random_newbies.py index 1b8bf6468..b379516f1 100644 --- a/server/matchmaker/algorithm/random_newbies.py +++ b/server/matchmaker/algorithm/random_newbies.py @@ -1,7 +1,7 @@ from typing import Dict, Iterable, List, Tuple from ..search import Match, Search -from .matchmaker import Matchmaker, MatchmakingPolicy1v1 +from .matchmaker import MatchmakingPolicy1v1 class RandomlyMatchNewbies(MatchmakingPolicy1v1): diff --git a/tests/unit_tests/test_matchmaker_algorithm_stable_marriage.py b/tests/unit_tests/test_matchmaker_algorithm_stable_marriage.py index 94dd85de1..b00b746ca 100644 --- a/tests/unit_tests/test_matchmaker_algorithm_stable_marriage.py +++ b/tests/unit_tests/test_matchmaker_algorithm_stable_marriage.py @@ -329,6 +329,7 @@ def test_partial_newbie_team_matched_with_newbie_team(player_factory): assert matches[partial_newbie] == newbie assert matches[newbie] == partial_newbie + assert len(unmatched_searches) == 0 def test_newbie_and_top_rated_team_not_matched_randomly(player_factory): @@ -345,6 +346,7 @@ def test_newbie_and_top_rated_team_not_matched_randomly(player_factory): matches, unmatched_searches = stable_marriage.RandomlyMatchNewbies().find(searches) assert not matches + assert len(unmatched_searches) == len(searches) def test_unmatched_newbies_forcefully_match_pros(player_factory):