コード例 #1
0
    def setUp(self):

        self.tower = TowerCost()

        self.tower.tower_mass = 434559.0
        self.tower.year = 2009
        self.tower.month = 12
コード例 #2
0
    def test1(self):

        tower = TowerCost()

        tower.tower_mass = 434559.0
        tower.year = 2009
        tower.month = 12

        check_gradient_unit_test(self, tower)
    def test1(self):

        tower = TowerCost()

        tower.tower_mass = 434559.0
        tower.year = 2009
        tower.month = 12

        check_gradient_unit_test(self, tower)
コード例 #4
0
class TestTowerCost(unittest.TestCase):

    def setUp(self):

        self.tower = TowerCost()

        self.tower.tower_mass = 434559.0
        self.tower.year = 2009
        self.tower.month = 12
    
    def test_functionality(self):
        
        self.tower.run()
        
        self.assertEqual(round(self.tower.cost,2), 987180.59)

    def test_gradient(self):

        check_gradient_unit_test(self, self.tower)