# Path: alchemist/test.py
# @contextmanager
# def settings(app, **kwargs):
#     """Save current application config and restore after block.
# 
#     Allows override with the keyword arguments.
#     """
# 
#     # Save the current application config to restore.
#     _config = dict(app.config)
# 
#     # Make requested changes for this scope.
#     app.config.update(kwargs)
# 
#     yield
# 
#     # Restore the previous application config.
#     app.config = _config


import alchemist
import contextlib
import py
    import mock
from alchemist.test import settings
from flask import Flask
from pytest import raises
from sqlalchemy.engine.result import ResultProxy
from sqlalchemy.exc import OperationalError
from . import utils
    from unittest import mock
        from alchemist.db._engine import Engine
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db, exceptions
        from alchemist import db, exceptions
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db, exceptions
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist.db._engine import Engine
        from alchemist import db
        from alchemist import db
        from alchemist import db
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import, division


try:   # pragma: nocoverage

except ImportError:  # pragma: nocoverage


class TestEngine:

    @staticmethod
    def _clear_cache():
        Engine.__getitem__._cache.clear()

    def setup(self):
        utils.unload_modules('alchemist')
        self._clear_cache()
        self.app = Flask('alchemist')
        self.context = self.app.app_context()
        self.context.push()

    def teardown(self):
        self.context.pop()
        self._clear_cache()

    def test_default_repr(self):

        uri = 'sqlite:///:memory:'

# Path: alchemist/test.py
# @contextmanager
# def settings(app, **kwargs):
#     """Save current application config and restore after block.
# 
#     Allows override with the keyword arguments.
#     """
# 
#     # Save the current application config to restore.
#     _config = dict(app.config)
# 
#     # Make requested changes for this scope.
#     app.config.update(kwargs)
# 
#     yield
# 
#     # Restore the previous application config.
#     app.config = _config


# Path: alchemist/tests/test_db.py
import alchemist
import contextlib
import py
    import mock
from alchemist.test import settings
from flask import Flask
from pytest import raises
from sqlalchemy.engine.result import ResultProxy
from sqlalchemy.exc import OperationalError
from . import utils
    from unittest import mock
        from alchemist.db._engine import Engine
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db, exceptions
        from alchemist import db, exceptions
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db, exceptions
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist import db
        from .a.models import Entity
        from alchemist import db
        from alchemist.db._engine import Engine
        from alchemist import db
        from alchemist import db
        from alchemist import db

# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import, division


try:   # pragma: nocoverage

except ImportError:  # pragma: nocoverage


class TestEngine:

    @staticmethod
    def _clear_cache():
        Engine.__getitem__._cache.clear()

    def setup(self):
        utils.unload_modules('alchemist')
        self._clear_cache()
        self.app = Flask('alchemist')
        self.context = self.app.app_context()
        self.context.push()

    def teardown(self):
        self.context.pop()
        self._clear_cache()

    def test_default_repr(self):

        uri = 'sqlite:///:memory:'

        with settings(self.app, DATABASES={'default': uri}):