Beispiel #1
0
    def test_logger_collapse_adj_sim(self):

        with self.assertLogs('wistl.tower', level='INFO') as cm:
            # tower14 (idl: 13,
            tower_dic = self.tower_dic.copy()
            tower = Tower(**tower_dic)
            tower.init()
            tower.no_sims = 10
            tower._wind = create_wind_given_bearing(
                130.0, 1.0712)  # 1.05*np.exp(0.02)
            tower.collapse_adj_sim

        msg = 'WARNING:wistl.tower'
        self.assertEqual(msg, ':'.join(cm.output[0].split(':')[:2]))
Beispiel #2
0
    def test_logger_dmg_sim(self):

        with self.assertLogs('wistl.tower', level='INFO') as cm:

            tower_dic = self.tower_dic.copy()
            tower = Tower(**tower_dic)
            tower.init()
            tower.no_sims = 10
            # 1. determine damage state of tower due to wind
            tower._wind = create_wind_given_bearing(
                130.0, 1.0712)  # 1.05*np.exp(0.02)
            tower.dmg_sim

        msg = 'WARNING:wistl.tower'
        self.assertEqual(msg, ':'.join(cm.output[0].split(':')[:2]))