Skip to content

Instantly share code, notes, and snippets.

View vjousse's full-sized avatar

Vincent Jousse vjousse

View GitHub Profile
@vjousse
vjousse / sqlalchemy_conftest.py
Created February 20, 2018 14:35 — forked from kissgyorgy/sqlalchemy_conftest.py
Python: py.test fixture for SQLAlchemy test in a transaction, create tables only once!
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from myapp.models import BaseModel
import pytest
@pytest.fixture(scope='session')
def engine():
return create_engine('postgresql://localhost/test_database)
<?php
// change this with the actual path you cloned sf2 to
$sf2_path = '~/symfony/src';
use Symfony\Foundation\ClassLoader;
use Symfony\Components\Console\Application;
require_once $sf2_path.'/Symfony/Foundation/ClassLoader.php';