コード例 #1
0
ファイル: __init__.py プロジェクト: MostAwesomeDude/pydra
def setup_test_environment():
    """
    configures test environment:
        * setup django environment
        * load pydra settings
        * silence logging
    """    
    # configure pydra and django environment
    configure_django_settings()
    settings = load_settings()
    
    # silence logging
    settings.LOG_LEVEL = 100
    logger = logging.getLogger('root')
    logger.level = 100
コード例 #2
0
    You should have received a copy of the GNU General Public License
    along with Pydra.  If not, see <http://www.gnu.org/licenses/>.
"""

import inspect
import os.path
import shutil
import tempfile
import time
import unittest
from datetime import datetime

#environment must be configured before loading tests
from pydra.config import configure_django_settings, load_settings
configure_django_settings()
load_settings()
import pydra_settings

from pydra.cluster.tasks import TaskNotFoundException, packaging
from pydra.cluster.tasks.task_manager import TaskManager
from pydra.models import TaskInstance
from pydra.util import makedirs

from pydra.tests.mixin_testcases import ModuleTestCaseMixIn
from pydra.tests import django_testcase

test_string = """
from pydra.cluster.tasks import Task
class TestTask(Task):
    def work(self, **kwargs): pass