# Path: onix/metrics.py
# def victory_chance(r1, d1, r2, d2):
# def gxe(r, d, d0=130.0):
# def skill_chance(r, d, baseline):


from onix import metrics
"""Tests for the metrics module"""



class TestVictoryChance(object):

    def test_elo(self):
        """Glicko formula should reduce to Elo if d1=d2=0
        Using http://bzstats.strayer.de/bzinfo/elo/ to test against"""

# Path: onix/metrics.py
# def victory_chance(r1, d1, r2, d2):
# def gxe(r, d, d0=130.0):
# def skill_chance(r, d, baseline):


# Path: tests/test_metrics.py
from onix import metrics

"""Tests for the metrics module"""



class TestVictoryChance(object):

    def test_elo(self):
        """Glicko formula should reduce to Elo if d1=d2=0
        Using http://bzstats.strayer.de/bzinfo/elo/ to test against"""

        assert .76 == round(metrics.victory_chance(1200, 0, 1000, 0), 2)