Fix test naming.

This commit is contained in:
Tobias Gruetzmacher 2016-04-16 11:54:29 +02:00
parent ee99c087d7
commit 7c3a87970b

View file

@ -5,6 +5,7 @@
import re import re
import os import os
import operator
import multiprocessing import multiprocessing
try: try:
from urllib.parse import urlsplit from urllib.parse import urlsplit
@ -133,7 +134,7 @@ def get_test_scrapers():
# faster # faster
testscrapernames = [ testscrapernames = [
'AbstruseGoose', 'AbstruseGoose',
'GoComics/CalvinandHobbes', 'GoComics/CalvinAndHobbes',
'xkcd' 'xkcd'
] ]
scraper_pattern = re.compile('|'.join(testscrapernames)) scraper_pattern = re.compile('|'.join(testscrapernames))
@ -147,4 +148,5 @@ def get_test_scrapers():
def pytest_generate_tests(metafunc): def pytest_generate_tests(metafunc):
if 'scraperobj' in metafunc.fixturenames: if 'scraperobj' in metafunc.fixturenames:
metafunc.parametrize('scraperobj', get_test_scrapers()) metafunc.parametrize('scraperobj', get_test_scrapers(),
ids=operator.attrgetter('name'))