mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Move webassets tests in their own file.
This commit is contained in:
parent
7088135f5e
commit
7ff0d0e686
3 changed files with 114 additions and 101 deletions
|
|
@ -3,11 +3,12 @@ __all__ = [
|
|||
'unittest',
|
||||
]
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
import cStringIO
|
||||
import importlib
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from functools import wraps
|
||||
from contextlib import contextmanager
|
||||
|
|
@ -138,3 +139,14 @@ def skipIfNoExecutable(executable):
|
|||
return unittest.skip('{0} executable not found'.format(executable))
|
||||
|
||||
return lambda func: func
|
||||
|
||||
|
||||
def module_exists(module_name):
|
||||
"""Test if a module is importable."""
|
||||
|
||||
try:
|
||||
importlib.import_module(module_name)
|
||||
except ImportError:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue