Skip to content

Commit

Permalink
Tests: Correct expected values for draw strength
Browse files Browse the repository at this point in the history
This commit places back the tests for draw strength when faced with a
unconfirmed ballot. Contrary to other metrics, the values should change
as they include the new draw. However, they should not contain the
scores from the unconfirmed ballot. This test shows that this behaviour
is current, and is expected.
  • Loading branch information
tienne-B committed Nov 19, 2023
1 parent 62d4de5 commit 56e6068
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tabbycat/standings/tests/test_standings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from unittest import expectedFailure

from django.test import TestCase

Expand Down Expand Up @@ -253,13 +252,15 @@ def setUp(self):
debate = self.set_up_ignorable_debate()
debate.ballotsubmission_set.update(confirmed=False)

@expectedFailure
def test_draw_strength(self):
super().test_draw_strength()
# The ignorable debate still counts as an opponent (because they definitely faced each
# other) but does not count as a win (because it's unconfirmed). So the losing team has
# faced the winning team 3 times (including ignorable debate), and the winning team has 2
# wins (excluding ignorable debate), for a losing team draw strength of 3 * 2 = 6.
self._base_metric_test({'draw_strength': [0, 6]})

@expectedFailure
def test_draw_strength_speaks(self):
super().test_draw_strength_speaks()
self._base_metric_test({'draw_strength_speaks': [591, 609]})


class TestBasicStandings(TestCase):
Expand Down

0 comments on commit 56e6068

Please sign in to comment.