소스 검색

Skip test_readme_5() if web query fails.

tags/v0.2
Ben Kurtovic 12 년 전
부모
커밋
5ca6f6c755
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. +4
    -1
      tests/test_docs.py

+ 4
- 1
tests/test_docs.py 파일 보기

@@ -113,7 +113,10 @@ class TestDocs(unittest.TestCase):
title = "Test"
data = {"action": "query", "prop": "revisions", "rvlimit": 1,
"rvprop": "content", "format": "json", "titles": title}
raw = urllib.urlopen(url1, urllib.urlencode(data)).read()
try:
raw = urllib.urlopen(url1, urllib.urlencode(data)).read()
except IOError:
self.skipTest("cannot continue because of unsuccessful web call")
res = json.loads(raw)
text = res["query"]["pages"].values()[0]["revisions"][0]["*"]
expected = urllib.urlopen(url2.format(title)).read().decode("utf8")


불러오는 중...
취소
저장