Fix tests with newer pytest versions.
This commit is contained in:
parent
fb9d8276a6
commit
27c90f07a5
1 changed files with 9 additions and 4 deletions
|
@ -34,10 +34,11 @@ class _ComicTester(TestCase):
|
||||||
scraperclass=None
|
scraperclass=None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.name = self.scraperclass.getName()
|
if self.scraperclass is not None:
|
||||||
self.url = self.scraperclass.starter()
|
self.name = self.scraperclass.getName()
|
||||||
# create a temporary directory for images
|
self.url = self.scraperclass.starter()
|
||||||
self.tmpdir = tempfile.mkdtemp()
|
# create a temporary directory for images
|
||||||
|
self.tmpdir = tempfile.mkdtemp()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
shutil.rmtree(self.tmpdir)
|
shutil.rmtree(self.tmpdir)
|
||||||
|
@ -48,6 +49,10 @@ class _ComicTester(TestCase):
|
||||||
return os.listdir(os.path.join(self.tmpdir, *dirs))
|
return os.listdir(os.path.join(self.tmpdir, *dirs))
|
||||||
|
|
||||||
def test_comic(self):
|
def test_comic(self):
|
||||||
|
if self.scraperclass is None:
|
||||||
|
# only run subclasses
|
||||||
|
import pytest
|
||||||
|
pytest.skip("base class")
|
||||||
# Test a scraper. It must be able to traverse backward for
|
# Test a scraper. It must be able to traverse backward for
|
||||||
# at least 5 strips from the start, and find strip images
|
# at least 5 strips from the start, and find strip images
|
||||||
# on at least 4 pages.
|
# on at least 4 pages.
|
||||||
|
|
Loading…
Reference in a new issue