remove ia64 keywords
[gentoo-zh.git] / dev-python / mw2fcitx / files / mw2fcitx-0.16.0-test-no-network.patch
blob59b13bad0686f8e04eff03ba5a72edc5c48be4cf
1 --- a/tests/cli/conf_one.py
2 +++ b/tests/cli/conf_one.py
3 @@ -2,7 +2,7 @@
5 exports = {
6 "source": {
7 - "api_path": "https://zh.wikipedia.org/w/api.php",
8 + "file_path": ["titles.txt"],
9 "kwargs": {
10 "title_limit": 50,
11 "output": "titles.txt"
12 --- a/tests/cli/conf_single_generator.py
13 +++ b/tests/cli/conf_single_generator.py
14 @@ -2,7 +2,7 @@
16 exports = {
17 "source": {
18 - "api_path": "https://zh.wikipedia.org/w/api.php",
19 + "file_path": ["titles.txt"],
20 "kwargs": {
21 "title_limit": 50,
22 "output": "titles.txt"
23 --- a/tests/lib/test_zhwiki.py
24 +++ b/tests/lib/test_zhwiki.py
25 @@ -3,8 +3,8 @@
28 def test_pipeline_basic():
29 - pipeline = MWFPipeline("https://zh.wikipedia.org/w/api.php")
30 - pipeline.fetch_titles(title_limit=50)
31 + pipeline = MWFPipeline()
32 + pipeline.load_titles_from_file("titles.txt")
33 pipeline.convert_to_words(moegirl_tweaks)
34 pipeline.export_words()
35 pipeline.generate_dict(generator="rime")
36 --- a/tests/cli/test_conf.py
37 +++ b/tests/cli/test_conf.py
38 @@ -1,4 +1,3 @@
39 -import time
40 from mw2fcitx.main import inner_main
41 import pytest
43 @@ -27,14 +26,6 @@
44 """)
47 -def test_continue():
48 - # this should run at least 8 secs = 2 * (5 / 1) - 2
49 - start = time.perf_counter()
50 - inner_main(['-c', 'tests/cli/conf_continue'])
51 - end = time.perf_counter()
52 - assert (end-start > 8)
55 def test_err_no_path():
56 with pytest.raises(SystemExit):
57 inner_main(['-c', 'tests/cli/conf_err_no_path'])