Fix test naming.
This commit is contained in:
parent
ee99c087d7
commit
7c3a87970b
1 changed files with 4 additions and 2 deletions
|
@ -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'))
|
||||||
|
|
Loading…
Reference in a new issue