Delete templates after test
This commit is contained in:
parent
6cefbfb20d
commit
8ce8a6f940
1 changed files with 16 additions and 1 deletions
|
@ -1,5 +1,20 @@
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
import os
|
||||||
|
from md_pdf.consts import TEMPLATES_DIR
|
||||||
|
|
||||||
|
|
||||||
class BaseTestCase(TestCase):
|
class BaseTestCase(TestCase):
|
||||||
pass
|
def deleteTemplates(self):
|
||||||
|
for template in [
|
||||||
|
'header.html',
|
||||||
|
'footer.html',
|
||||||
|
'cover.html',
|
||||||
|
'toc-xml',
|
||||||
|
]:
|
||||||
|
try:
|
||||||
|
os.remove(os.path.join(TEMPLATES_DIR, template))
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
self.deleteTemplates()
|
||||||
|
|
Reference in a new issue