예제 #1
0
    def test_get_headroom_half(self):
        ambient = 20
        temp = 50
        limit = 80

        headroom = _get_headroom(ambient=ambient, temp=temp, limit=limit)

        assert headroom == 0.50
예제 #2
0
    def test_get_headroom_three_quarter(self):
        ambient = 20
        temp = 35
        limit = 80

        headroom = _get_headroom(ambient=ambient, temp=temp, limit=limit)

        assert headroom == 0.75
예제 #3
0
    def test_get_headroom_None(self):
        ambient = None
        temp = None
        limit = None

        headroom = _get_headroom(ambient=ambient, temp=temp, limit=limit)

        assert isinstance(headroom, type(None))
    def test_get_headroom_None(self):
        ambient = None
        temp = None
        limit = None

        headroom = _get_headroom(
            ambient=ambient, temp=temp, limit=limit)

        assert isinstance(headroom, type(None))