From 021376851109adc0e9c5627d4985eafa4c9b2344 Mon Sep 17 00:00:00 2001 From: NateScarlet Date: Fri, 20 Sep 2019 19:05:12 +0800 Subject: [PATCH] fix: use consist paper url order --- fetch_holidays.py | 1 + tests/test_fetch_holidays.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch_holidays.py b/fetch_holidays.py index 7658105..e803d3b 100755 --- a/fetch_holidays.py +++ b/fetch_holidays.py @@ -39,6 +39,7 @@ def get_paper_urls(year: int) -> List[str]: ret = re.findall( r'
  • ', body, flags=re.S) ret = [i for i in ret if i not in PAPER_EXCLUDE] + ret.sort() return ret diff --git a/tests/test_fetch_holidays.py b/tests/test_fetch_holidays.py index fbaf9d2..affcb7b 100644 --- a/tests/test_fetch_holidays.py +++ b/tests/test_fetch_holidays.py @@ -9,8 +9,8 @@ from .filetools import _file_path def test_get_paper_urls(): assert get_paper_urls(2019) == [ + 'http://www.gov.cn/zhengce/content/2018-12/06/content_5346276.htm', 'http://www.gov.cn/zhengce/content/2019-03/22/content_5375877.htm', - 'http://www.gov.cn/zhengce/content/2018-12/06/content_5346276.htm' ]