瀏覽代碼

Missed the required result.cached attribute.

pull/24/head
Ben Kurtovic 12 年之前
父節點
當前提交
8345559b3e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. +4
    -0
      pages/copyvios.mako

+ 4
- 0
pages/copyvios.mako 查看文件

@@ -28,11 +28,14 @@
# result = get_cached_results(page, conn)
# if query.get("nocache") or not result:
# result = get_fresh_results(page, conn)
tstart = time()
mc1 = __import__("earwigbot").wiki.copyvios.MarkovChain(page.get())
mc2 = __import__("earwigbot").wiki.copyvios.MarkovChain(u"This is some random textual content for a page.")
mci = __import__("earwigbot").wiki.copyvios.MarkovChainIntersection(mc1, mc2)
result = __import__("earwigbot").wiki.copyvios.CopyvioCheckResult(
True, 0.67123, "http://example.com/", 7, mc1, (mc2, mci))
result.cached = False
result.tdiff = time() - tstart
# END TEST BLOCK
return page, result

@@ -58,6 +61,7 @@
def get_url_specific_results(page, url):
t_start = time()
result = page.copyvio_compare(url)
result.cached = False
result.tdiff = time() - t_start
return result



Loading…
取消
儲存