teach plugins with dependencies to behave

This commit is contained in:
Deniz Turgut
2013-04-12 18:26:32 -04:00
parent c694cb404d
commit 31ccbde072
86 changed files with 45 additions and 930 deletions

View File

@@ -13,10 +13,6 @@ import subprocess
from pelican import Pelican
from pelican.settings import read_settings
import pytest
assets = pytest.importorskip("assets")
CUR_DIR = os.path.dirname(__file__)
THEME_DIR = os.path.join(CUR_DIR, 'test_data')
CSS_REF = open(os.path.join(THEME_DIR, 'static', 'css',
@@ -62,10 +58,10 @@ class TestWebAssets(unittest.TestCase):
"""Base class for testing webassets."""
def setUp(self, override=None):
import assets
self.temp_path = mkdtemp(prefix='pelicantests.')
settings = {
'PATH': os.path.join(os.path.dirname(CUR_DIR), 'tests', 'content'),
'PATH': os.path.join(os.path.dirname(CUR_DIR), 'test_data', 'content'),
'OUTPUT_PATH': self.temp_path,
'PLUGINS': [assets],
'THEME': THEME_DIR,