1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

fix extractor docstrings

This commit is contained in:
Mike Fährmann 2018-04-18 18:01:43 +02:00
parent df7e18399e
commit b1325d4d2c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 13 additions and 2 deletions

View File

@ -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]}"]

View File

@ -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}"

View File

@ -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()