def test_cached_pwa_forgets_cache():
    cached_pwa = CachedPWA(src, tgt)
    r1 = cached_pwa.apply(points)
    cached_pwa.apply(points[40:60])
    # cache is now set to something other than points
    # should clear cache and be fine
    r2 = cached_pwa.apply(points)
    assert_equal(r1, r2)
def test_cached_pwa_same_twice():
    cached_pwa = CachedPWA(src, tgt)
    r1 = cached_pwa.apply(points)
    # now using cache
    r2 = cached_pwa.apply(points)
    assert_equal(r1, r2)
Beispiel #3
0
def test_cached_pwa_same_as_python_pwa():
    cached_pwa = CachedPWA(src, tgt)
    python_pwa = PythonPWA(src, tgt)
    assert_equal(python_pwa.apply(points), cached_pwa.apply(points))