class TestPerformance(unittest.TestCase):
    def setUp(self):
        settings = Settings()
        self.perf = Performance(polar_data=settings.polar_data)
        
    @unittest.skipIf(testing_helper.offline, "Can't get boat performance offline")
    def testGetOptimalAngles(self):
        angles = self.perf.get_optimal_angles(8.8)
        self.assertTrue(angles[0] > 0)
        self.assertTrue(angles[0] < math.pi * 0.333)
        self.assertTrue(angles[1] > math.pi * 0.666)
Beispiel #2
0
class TestPerformance(unittest.TestCase):
    def setUp(self):
        settings = Settings()
        self.perf = Performance(polar_data=settings.polar_data)

    @unittest.skipIf(testing_helper.offline,
                     "Can't get boat performance offline")
    def testGetOptimalAngles(self):
        angles = self.perf.get_optimal_angles(8.8)
        self.assertTrue(angles[0] > 0)
        self.assertTrue(angles[0] < math.pi * 0.333)
        self.assertTrue(angles[1] > math.pi * 0.666)
Beispiel #3
0
import unittest
import math
import testing_helper
import timeit
from datetime import datetime, timedelta
import numpy as np

from softsailor.sol.sol_settings import Settings
from softsailor.sol.sol_performance import Performance

settings = Settings()
polars = settings.polars
perf = Performance(polars=polars)


def test_polar():
    angles = np.linspace(1, 2, 20)
    for i in xrange(50000):
        polars.get(angles, 8.8)


def test_perf():
    for i in xrange(50000):
        perf.get((1.1, 8.8))


class TestPerformance(unittest.TestCase):
    @unittest.skipIf(testing_helper.offline,
                     "Can't get boat performance offline")
    def testGetOptimalAngles(self):
        angles = perf.get_optimal_angles(8.8)
 def setUp(self):
     settings = Settings()
     self.perf = Performance(polar_data=settings.polar_data)
Beispiel #5
0
 def setUp(self):
     settings = Settings()
     self.perf = Performance(polar_data=settings.polar_data)