diff --git a/sqlalchemy_utils/functions/__init__.py b/sqlalchemy_utils/functions/__init__.py index 482c1e4..998dc7d 100644 --- a/sqlalchemy_utils/functions/__init__.py +++ b/sqlalchemy_utils/functions/__init__.py @@ -271,9 +271,7 @@ def create_mock_engine(bind, stream=None): text = re.sub(r'\n+', '\n', text) text = text.strip('\n').strip() - stream.write('\n') - stream.write(text) - stream.write(';') + stream.write('\n%s;' % text) else: