From 7aa1c9671baf6193cadc878c6a44477e8575dbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 1 Jan 2024 02:51:34 +0100 Subject: [PATCH] [tests] fix 'invalid escape sequence' warnings --- test/results/4plebs.py | 2 +- test/results/imgbb.py | 2 +- test/results/paheal.py | 2 +- test/results/raddle.py | 4 ++-- test/results/wikiart.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/results/4plebs.py b/test/results/4plebs.py index bae62608..affe14d8 100644 --- a/test/results/4plebs.py +++ b/test/results/4plebs.py @@ -12,7 +12,7 @@ __tests__ = ( "#url" : "https://archive.4plebs.org/tg/thread/54059290", "#category": ("foolfuuka", "4plebs", "thread"), "#class" : foolfuuka.FoolfuukaThreadExtractor, - "#pattern" : "https://i\.4pcdn\.org/tg/1[34]\d{11}\.(jpg|png|gif)", + "#pattern" : r"https://i\.4pcdn\.org/tg/1[34]\d{11}\.(jpg|png|gif)", "#count" : 30, }, diff --git a/test/results/imgbb.py b/test/results/imgbb.py index b2351d0f..e2d1bc33 100644 --- a/test/results/imgbb.py +++ b/test/results/imgbb.py @@ -21,7 +21,7 @@ __tests__ = ( "album_id" : "i5PggF", "album_name" : "British Scrap Book", "extension" : "jpg", - "id" : "re:^\w{7}$", + "id" : r"re:^\w{7}$", "title" : str, "url" : r"re:https://i\.ibb\.co/\w{7}/[\w-]+\.jpg", "user" : "folkie", diff --git a/test/results/paheal.py b/test/results/paheal.py index 1772593b..46b210f6 100644 --- a/test/results/paheal.py +++ b/test/results/paheal.py @@ -12,7 +12,7 @@ __tests__ = ( "#url" : "https://rule34.paheal.net/post/list/Ayane_Suzuki/1", "#category": ("shimmie2", "paheal", "tag"), "#class" : paheal.PahealTagExtractor, - "#pattern" : "https://[^.]+\.paheal\.net/_images/\w+/\d+%20-%20|https://r34i\.paheal-cdn\.net/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{32}$", + "#pattern" : r"https://[^.]+\.paheal\.net/_images/\w+/\d+%20-%20|https://r34i\.paheal-cdn\.net/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{32}$", "#count" : range(70, 200), "date" : "type:datetime", diff --git a/test/results/raddle.py b/test/results/raddle.py index 4e60abb7..0c9de429 100644 --- a/test/results/raddle.py +++ b/test/results/raddle.py @@ -21,7 +21,7 @@ __tests__ = ( "#category": ("postmill", "raddle.me", "forum"), "#class" : postmill.PostmillForumExtractor, "#count" : 1, - "#pattern" : "^https://raddle\.me/f/traa/156646/click-here-to-go-to-f-traaaaaaannnnnnnnnns$", + "#pattern" : r"^https://raddle\.me/f/traa/156646/click-here-to-go-to-f-traaaaaaannnnnnnnnns$", }, { @@ -97,7 +97,7 @@ __tests__ = ( "#comment" : "Link + text post (with text disabled)", "#category": ("postmill", "raddle.me", "post"), "#class" : postmill.PostmillPostExtractor, - "#pattern" : "^https://fantasyanime\.com/anime/neo-tokyo-dub$", + "#pattern" : r"^https://fantasyanime\.com/anime/neo-tokyo-dub$", "#count" : 1, }, diff --git a/test/results/wikiart.py b/test/results/wikiart.py index 47eb3ec7..9ab13103 100644 --- a/test/results/wikiart.py +++ b/test/results/wikiart.py @@ -12,7 +12,7 @@ __tests__ = ( "#url" : "https://www.wikiart.org/en/thomas-cole", "#category": ("", "wikiart", "artist"), "#class" : wikiart.WikiartArtistExtractor, - "#pattern" : "https://uploads\d+\.wikiart\.org/(\d+/)?images/thomas-cole/[\w()-]+\.(jpg|png)", + "#pattern" : r"https://uploads\d+\.wikiart\.org/(\d+/)?images/thomas-cole/[\w()-]+\.(jpg|png)", "#count" : "> 100", "albums" : None,