From b1325d4d2c2e5ba3d12ff2af1d6d35335dada953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 18 Apr 2018 18:01:43 +0200 Subject: [PATCH] fix extractor docstrings --- gallery_dl/extractor/artstation.py | 2 +- gallery_dl/extractor/tumblr.py | 2 +- test/test_extractor.py | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/artstation.py b/gallery_dl/extractor/artstation.py index fbea9595..39e6fe6b 100644 --- a/gallery_dl/extractor/artstation.py +++ b/gallery_dl/extractor/artstation.py @@ -137,7 +137,7 @@ class ArtstationUserExtractor(ArtstationExtractor): class ArtstationAlbumExtractor(ArtstationExtractor): - """Extractor for all projects of an artstation user""" + """Extractor for all projects in an artstation album""" subcategory = "album" directory_fmt = ["{category}", "{userinfo[username]}", "Albums", "{album[id]} - {album[title]}"] diff --git a/gallery_dl/extractor/tumblr.py b/gallery_dl/extractor/tumblr.py index f853d964..c4e94dad 100644 --- a/gallery_dl/extractor/tumblr.py +++ b/gallery_dl/extractor/tumblr.py @@ -234,7 +234,7 @@ class TumblrTagExtractor(TumblrExtractor): class TumblrLikesExtractor(TumblrExtractor): - """Extractor for images from a tumblr-user by tag""" + """Extractor for images from a tumblr-user's liked posts""" subcategory = "likes" directory_fmt = ["{category}", "{name}", "likes"] archive_fmt = "f_{blog[name]}_{id}_{offset}" diff --git a/test/test_extractor.py b/test/test_extractor.py index 9c8b9a14..00d6f4ba 100644 --- a/test/test_extractor.py +++ b/test/test_extractor.py @@ -133,6 +133,17 @@ class TestExtractor(unittest.TestCase): msg = "'{}' isn't matched by any pattern".format(url) self.fail(msg) + def test_docstrings(self): + """ensure docstring uniqueness""" + for extr1 in extractor.extractors(): + for extr2 in extractor.extractors(): + if extr1 != extr2 and extr1.__doc__ and extr2.__doc__: + self.assertNotEqual( + extr1.__doc__, + extr2.__doc__, + "{} <-> {}".format(extr1, extr2), + ) + if __name__ == "__main__": unittest.main()