

def test_rrlyrae_lightcurves():
    for partial in [True, False]:
        try:
            rrlyrae = fetch_rrlyrae(partial=partial)
        except (URLError, ConnectionError):
            raise SkipTest('No internet connection: data download test skipped')
        lcid = rrlyrae.ids[0]
        if (not partial):
            (t, y, dy) = rrlyrae.get_lightcurve(lcid, return_1d=False)
            assert (t.ndim == 2)
            assert (t.shape == y.shape)
            assert (t.shape == dy.shape)
        (t, y, dy, filts) = rrlyrae.get_lightcurve(lcid)
        assert (t.ndim == 1)
        assert (t.shape == y.shape)
        assert (t.shape == dy.shape)
        assert (t.shape == filts.shape)
        assert (not np.any(np.isnan(((t + y) + dy))))
        meta = rrlyrae.get_metadata(lcid)
        assert (meta['id'] == int(lcid))
        meta = rrlyrae.get_obsmeta(lcid)
        assert (meta['id'] == int(lcid))

dataset/ETHPy150Open astroML/gatspy/gatspy/datasets/tests/test_rrlyrae.py test_rrlyrae_lightcurves/original