Ejemplo n.º 1
0
 def test_data_transfer(self):
     path = os.path.join(DATADIR, 'frenchbug.zip')
     with Print.patch() as p:
         info(path, datatransfer=True)
     got = str(p)
     self.assertIn('RlzsAssoc', got)
     self.assertIn('Number of tasks to be generated: 14', got)
Ejemplo n.º 2
0
    def test_zip_filtering(self):
        path = os.path.join(DATADIR, 'frenchbug.zip')
        with Print.patch() as p:
            info(path, filtersources=True)
        exp = self.EXPECTED + '''
n_sites 1
n_sources 1
n_levels 29
output_weight 29.0
n_realizations 1
n_imts 1
curve_matrix_size 232 B'''
        self.assertEqual(exp, str(p))
Ejemplo n.º 3
0
    def test_zip_filtering(self):
        path = os.path.join(DATADIR, 'frenchbug.zip')
        with Print.patch() as p:
            info(path, filtersources=True)
        exp = self.EXPECTED + '''
c_matrix 232 B
max_realizations 1
n_imts 1
n_levels 29.0
n_sites 1
n_sources 1
output_weight 29.0'''
        self.assertEqual(exp, str(p))
Ejemplo n.º 4
0
    def test_zip_weighting(self):
        path = os.path.join(DATADIR, 'frenchbug.zip')
        with Print.patch() as p:
            info(path, weightsources=True)
        exp = self.EXPECTED + '''
n_sites 1
n_sources 1
input_weight 1722.0
n_levels 29
output_weight 29.0
n_realizations 1
n_imts 1
curve_matrix_size 232 B'''
        self.assertEqual(exp, str(p))
Ejemplo n.º 5
0
 def test_zip(self):
     path = os.path.join(DATADIR, 'frenchbug.zip')
     with Print.patch() as p:
         info(path)
     self.assertEqual(self.EXPECTED, str(p))
Ejemplo n.º 6
0
 def test_exports(self):
     with Print.patch() as p:
         info(None, None, None, True, None, '')
     self.assertGreater(len(str(p)), 10)
Ejemplo n.º 7
0
 def test_calculators(self):
     with Print.patch() as p:
         info(True, None, None, None, None, '')
     self.assertGreater(len(str(p)), 10)
Ejemplo n.º 8
0
 def test_zip(self):
     path = os.path.join(DATADIR, 'frenchbug.zip')
     with Print.patch() as p:
         info(None, None, None, None, None, path)
     self.assertEqual(self.EXPECTED, str(p)[:len(self.EXPECTED)])
Ejemplo n.º 9
0
 def test_exports(self):
     with Print.patch() as p:
         info(None, None, None, True, None, '')
     self.assertGreater(len(str(p)), 10)
Ejemplo n.º 10
0
 def test_calculators(self):
     with Print.patch() as p:
         info(True, None, None, None, None, '')
     self.assertGreater(len(str(p)), 10)