fix extractor names
This commit is contained in:
@@ -144,6 +144,29 @@ class TestExtractor(unittest.TestCase):
|
||||
"{} <-> {}".format(extr1, extr2),
|
||||
)
|
||||
|
||||
def test_names(self):
|
||||
"""Ensure extractor classes are named CategorySubcategoryExtractor"""
|
||||
mapping = {
|
||||
"2chan" : "futaba",
|
||||
"3dbooru": "threedeebooru",
|
||||
"4chan" : "fourchan",
|
||||
"4plebs" : "fourplebs",
|
||||
"8chan" : "infinitychan",
|
||||
"b4k" : "bfourk",
|
||||
"oauth" : None,
|
||||
"rbt" : "rebeccablacktech",
|
||||
"whatisthisimnotgoodwithcomputers": "witingwc",
|
||||
}
|
||||
|
||||
for extr in extractor.extractors():
|
||||
category = mapping.get(extr.category, extr.category)
|
||||
if category:
|
||||
expected = "{}{}Extractor".format(
|
||||
category.capitalize(),
|
||||
extr.subcategory.capitalize(),
|
||||
)
|
||||
self.assertEqual(expected, extr.__name__)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
@@ -21,6 +21,7 @@ TRAVIS_SKIP = {
|
||||
|
||||
# temporary issues, etc.
|
||||
BROKEN = {
|
||||
"gomanga", # server down
|
||||
"pinterest", # access tokens have been set to 10 requests per hour
|
||||
"puremashiro", # online reader down
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user