From 93d1ca16dbf16128b79284bfae068bfd083e4f75 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Thu, 4 Jul 2019 16:47:33 +0800 Subject: [PATCH] update tests --- tests/test_anitya.py | 2 +- tests/test_regex.py | 4 ++-- tests/test_substitute.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_anitya.py b/tests/test_anitya.py index cf0a818..b6cc19a 100644 --- a/tests/test_anitya.py +++ b/tests/test_anitya.py @@ -5,4 +5,4 @@ import pytest pytestmark = pytest.mark.asyncio async def test_anitya(get_version): - assert await get_version("shutter", {"anitya": "fedora/shutter"}) == "0.94.2" + assert await get_version("shutter", {"anitya": "fedora/shutter"}) == "0.94.3" diff --git a/tests/test_regex.py b/tests/test_regex.py index 5ffd50f..0c1ac72 100644 --- a/tests/test_regex.py +++ b/tests/test_regex.py @@ -9,14 +9,14 @@ pytestmark = pytest.mark.asyncio async def test_regex_httpbin(get_version): assert await get_version("example", { "url": "https://httpbin.org/get", - "regex": '"User-Agent": "(\w+)"', + "regex": r'"User-Agent": "(\w+)"', "user_agent": "Meow", }) == "Meow" async def test_regex(get_version): assert await get_version("example", { "url": "http://example.net/", - "regex": 'for (\w+) examples', + "regex": r'for (\w+) examples', }) == "illustrative" async def test_missing_ok(get_version): diff --git a/tests/test_substitute.py b/tests/test_substitute.py index 1b033ec..62ac954 100644 --- a/tests/test_substitute.py +++ b/tests/test_substitute.py @@ -17,4 +17,4 @@ async def test_substitute_regex_missing_ok(get_version): assert await get_version("example", {"manual": "r15", "from_pattern": r"r(\d+)([a-z])", "to_pattern": r"r\1.\2"}) == "r15" async def test_substitute_prefix_has_higher_priority(get_version): - assert await get_version("example", {"manual": "r15", "prefix": "r", "from_pattern": "r(\d+)", "to_pattern": "R\1"}) == "15" + assert await get_version("example", {"manual": "r15", "prefix": "r", "from_pattern": r"r(\d+)", "to_pattern": r"R\1"}) == "15"