def test_biss_startend02(): a = np.array(values) biss = BISS() res = biss.request('TCNUSAER',start=2000001, end=2000366) t = res['TCNUSAER']._data for i in range(0,366): if not np.isnan(t[i]): assert a[i]-t[i]<1e-10
def test_biss_startend04(): biss = BISS() res1 = biss.request('TCNUSAER',start=2001360, end=2001366) res2 = biss.request('TCNUSAER',start=2001366, end=2002010) t1 = res1['TCNUSAER']._data t2 = res2['TCNUSAER']._data import scikits.timeseries.lib.reportlib as rl basicReport = rl.Report(t1,t2) basicReport()
def test_biss_startend01(): target = +3.38395879999993E+003 biss = BISS() res = biss.request('TCNUSAER',start=2000001, end=2011000) t = res['TCNUSAER']._data a = np.nansum( t.series ) assert a-target < 1e-10 assert t.start_date == ts.Date('D',year=2000,month=1,day=1) assert len(t)==4026
def test_biss_data01(): target = +3.65999489999992E+003 biss = BISS() res = biss.request('TCNUSAER',end=2011000) t = res['TCNUSAER']._data a = np.nansum( t.series ) assert a-target < 1e-10 assert t.start_date == ts.Date('D',year=1999,month=1,day=1) assert len(t)==4392
def test_biss_startend03(): a = np.array(values) b = a.cumsum() biss = BISS() for i in range(1,366): end = 2000*1000+i target = b[i-1] res = biss.request('TCNUSAER',start=2000001, end=end) t = res['TCNUSAER']._data h = np.nansum( t.series ) # print end, i, target , h, len(t),a[i-1],t[i-1] assert (h-target) < 1e-10 if target else True assert len(t)==i
def test_biss_freq03(): biss_prod = BISS() biss_test = BISS(hostname='DB2T') freq_t = biss_test.frequenza('TCNUSAER') freq_p = biss_prod.frequenza('TCNUSAER') assert freq_t==freq_p
def test_biss_freq02(): biss = BISS() freq = biss.ts_freq('TCNUSAER') assert freq=='D'
def test_biss_freq01(): biss = BISS() freq = biss.frequenza('TCNUSAER') assert freq==366