コード例 #1
0
ファイル: test_station.py プロジェクト: h3mpti/powerlink
def test_nearby_location_correct_power():
    station = Station(Point(0, 0), 10)
    device_location = Point(5, 5)
    assert round(station.power(device_location), 4) == 8.5786
コード例 #2
0
ファイル: test_station.py プロジェクト: h3mpti/powerlink
def test_out_of_distance_location_no_power():
    station = Station(Point(0, 0), 10)
    device_location = Point(11, 11)
    assert station.power(device_location) == 0
コード例 #3
0
ファイル: test_station.py プロジェクト: h3mpti/powerlink
def test_location_full_power():
    station = Station(Point(0, 0), 10)
    device_location = Point(0, 0)
    assert station.power(device_location) == 100