Limit number of tests for Travis CI.
This commit is contained in:
parent
2121e9bdf9
commit
727af5ecab
1 changed files with 6 additions and 6 deletions
|
@ -89,13 +89,13 @@ def make_comic_tester(name, **kwargs):
|
||||||
def generate_comic_testers():
|
def generate_comic_testers():
|
||||||
"""For each comic scraper, create a test class."""
|
"""For each comic scraper, create a test class."""
|
||||||
g = globals()
|
g = globals()
|
||||||
# optional: limit number of scraper tests
|
if "TRAVIS" in os.environ:
|
||||||
max_scrapers = 0
|
# get limited number of scraper tests on Travis builds
|
||||||
if max_scrapers:
|
max_scrapers = 20
|
||||||
scrapers = islice(scraper.get_scraperclasses(), 0, max_scrapers)
|
scraperclasses = islice(scraper.get_scraperclasses(), 0, max_scrapers)
|
||||||
else:
|
else:
|
||||||
scrapers = scraper.get_scraperclasses()
|
scraperclasses = scraper.get_scraperclasses()
|
||||||
for scraperclass in scrapers:
|
for scraperclass in scraperclasses:
|
||||||
name = 'Test'+scraperclass.__name__
|
name = 'Test'+scraperclass.__name__
|
||||||
g[name] = make_comic_tester(name, scraperclass=scraperclass)
|
g[name] = make_comic_tester(name, scraperclass=scraperclass)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue