예제 #1
0
    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>')
예제 #2
0
    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))
예제 #3
0
    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))
예제 #4
0
    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))
예제 #5
0
    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''')
예제 #6
0
    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))
예제 #7
0
    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))
예제 #8
0
 def test_show_oqparam(self):
     with Print.patch() as p:
         show('oqparam', self.calc_id)
     self.assertIn('"inputs": {', str(p))