def test_show_calc(self): # test show all with Print.patch() as p: show('all') with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitecol', str(p)) with Print.patch() as p: show('sitecol', self.calc_id) self.assertEqual(str(p), '<SiteCollection with 1 sites>')
def test_show_calc(self): with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitecol', str(p)) with Print.patch() as p: show('sitecol', self.calc_id) self.assertIn('sids,lon,lat,depth,vs30,vs30measured', str(p)) with Print.patch() as p: show('slow_sources', self.calc_id) self.assertIn('source_id code calc_time num_sites', str(p))
def test_show_calc(self): with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitecol', str(p)) with Print.patch() as p: show('sitecol', self.calc_id) self.assertEqual(str(p), '<SiteCollection with 1 sites>') with Print.patch() as p: show('slow_sources', self.calc_id) self.assertIn('source_id source_class num_ruptures calc_time ' 'num_sites num_split', str(p))
def test_show_calc(self): with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitecol', str(p)) with Print.patch() as p: show('sitecol', self.calc_id) self.assertEqual(str(p), '<SiteCollection with 1/1 sites>') with Print.patch() as p: show('slow_sources', self.calc_id) self.assertIn('grp_id source_id code gidx1 gidx2 num_ruptures ' 'calc_time num_sites', str(p))
def test_show_calc(self): # test show all with Print.patch() as p: show('all') with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitemesh', str(p)) with Print.patch() as p: show('sitemesh', self.calc_id) self.assertEqual(str(p), '''\ lon,lat 0.000000E+00,0.000000E+00''')
def test_show_calc(self): with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitecol', str(p)) with Print.patch() as p: show('sitecol', self.calc_id) self.assertEqual(str(p), 'sids,lon,lat,depth,vs30,vs30measured\n' '0,0.00000,0.00000,-0.10000,8.000000E+02,1') with Print.patch() as p: show('slow_sources', self.calc_id) self.assertIn('source_id grp_id code num_ruptures ' 'calc_time num_sites', str(p))
def test_show_calc(self): with Print.patch() as p: show('contents', self.calc_id) self.assertIn('sitecol', str(p)) with Print.patch() as p: show('sitecol', self.calc_id) self.assertEqual(str(p), '<SiteCollection with 1/1 sites>') with Print.patch() as p: show('slow_sources', self.calc_id) self.assertIn( 'grp_id source_id code gidx1 gidx2 num_ruptures ' 'calc_time num_sites', str(p))
def test_show_oqparam(self): with Print.patch() as p: show('oqparam', self.calc_id) self.assertIn('"inputs": {', str(p))