Dear developpers,
I am testing a GMPE we coded.
The test results with nosetests were not as expected,
and I'd like to get the values calculated by OQ for each single test,
so that I can better understand the issue.
First question:
Is it possible?
In any case, as second question,
I wanted to make a test for pga only,
so that I wrote the test case XXX_MeanPgaOnly_test.py:
======================================================================
from openquake.hazardlib.gsim.XXX import XXX
from openquake.hazardlib.tests.gsim.utils import BaseGSIMTestCase
class XXXTestCase(BaseGSIMTestCase):
GSIM_CLASS = Bindietal2011
def test_std_solo_pga(self):
self.check(XXX/XXX_MEAN_SOLOPGA.csv',
max_discrep_percentage=0.1)
======================================================================
I wrote the csv file, whose first lines were:
======================================================================
rup_mag,rup_rake,dist_rjb,site_vs30,result_type,damping,pga
4,0,0,800,MEAN,5,0.0266237706
4.5,0,0,800,MEAN,5,0.0479038204
======================================================================
And I run "nosetests XXX_MeanPgaOnly_test.py" getting the following result:
======================================================================
FAIL: test_std_solo_pga (openquake.hazardlib.tests.gsim.XXX_MeanPgaOnly_test.XXXTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/openquake/GEM/openquake/oq-hazardlib/openquake/hazardlib/tests/gsim/XXX_MeanPgaOnly_test.py", line 29, in test_std_solo_pga
max_discrep_percentage=0.1)
File "/home/openquake/GEM/openquake/oq-hazardlib/openquake/hazardlib/tests/gsim/utils.py", line 49, in check
raise AssertionError(stats)
AssertionError: total of 672 checks done, 0 were successful and 672 failed.
0.1 seconds spent, avg rate is 7250.1 checks per seconds.
success rate = 0.0%
average discrepancy = 10.1252%
maximum discrepancy = 10.6912%
standard deviation = 0.3993%
----------------------------------------------------------------------
Ran 1 test in 0.094s
FAILED (failures=1)
======================================================================
What is wrong here please?
Thank you,
Francesco