# Path: converge/framework/datastore.py
# class Datastore(object):
#         class NotFound(KeyError):
#     def __new__(cls, *args):
#     def __init__(self, name, *fields):
#     def clear_all():
#     def clear(self):
#     def find(self, **kwargs):
#     def create_with_key(self, key, **kwargs):
#     def create(self, **kwargs):
#     def read(self, key):
#     def update(self, key, **kwargs):
#     def delete(self, key):
# 
# Path: converge/framework/scenario.py
# def list_all(directory):
#     def load_all(cls, directory):
#     def __init__(self, name, path):
#     def __call__(self, _event_loop, **global_env):
# class Scenario(object):


import functools
import logging
import unittest
import converge
import converge.processes
from converge.framework import datastore
from converge.framework import scenario
            return generic_test(testcase, *args, **kwargs)

        return test_func

    for test_name in loader.getTestCaseNames(TestCase):
        base_test = getattr(TestCase, test_name)

        for scenario in getattr(TestCase, 'scenarios', []):
            name, parameters = scenario

            test_func = create_test_func(base_test, parameters)
            setattr(TestCase, '%s(%s)' % (test_name, name), test_func)

        delattr(TestCase, test_name)

    TestCase.scenarios = None
    return TestCase


@with_scenarios
class ScenarioTest(unittest.TestCase):

    scenarios = [(name, {'name': name, 'path': path})
                    for name, path in scenario.list_all('scenarios')]

    def setUp(self):
        super(ScenarioTest, self).setUp()
        self.procs = converge.processes.Processes()

    def tearDown(self):

# Path: converge/framework/datastore.py
# class Datastore(object):
#         class NotFound(KeyError):
#     def __new__(cls, *args):
#     def __init__(self, name, *fields):
#     def clear_all():
#     def clear(self):
#     def find(self, **kwargs):
#     def create_with_key(self, key, **kwargs):
#     def create(self, **kwargs):
#     def read(self, key):
#     def update(self, key, **kwargs):
#     def delete(self, key):
# 
# Path: converge/framework/scenario.py
# def list_all(directory):
#     def load_all(cls, directory):
#     def __init__(self, name, path):
#     def __call__(self, _event_loop, **global_env):
# class Scenario(object):


# Path: test_converge.py
import functools
import logging
import unittest
import converge
import converge.processes
from converge.framework import datastore
from converge.framework import scenario

            return generic_test(testcase, *args, **kwargs)

        return test_func

    for test_name in loader.getTestCaseNames(TestCase):
        base_test = getattr(TestCase, test_name)

        for scenario in getattr(TestCase, 'scenarios', []):
            name, parameters = scenario

            test_func = create_test_func(base_test, parameters)
            setattr(TestCase, '%s(%s)' % (test_name, name), test_func)

        delattr(TestCase, test_name)

    TestCase.scenarios = None
    return TestCase


@with_scenarios
class ScenarioTest(unittest.TestCase):

    scenarios = [(name, {'name': name, 'path': path})
                    for name, path in scenario.list_all('scenarios')]

    def setUp(self):
        super(ScenarioTest, self).setUp()
        self.procs = converge.processes.Processes()

    def tearDown(self):

        datastore.Datastore.clear_all()