Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(28)  |  Call(23)  |  Derive(0)  |  Import(5)

src/s/q/sqlsoup-0.9.0/tests/test_sqlsoup.py   sqlsoup(Download)
import sqlsoup
from tests import eq_, assert_raises, \
    assert_raises_message
from sqlalchemy import create_engine, or_, desc, select, func, exc, \
    Table, util, Column, Integer
        users = db.users
        assert_raises_message(
            sqlsoup.SQLSoupError,
            "Attribute 'users' is already mapped",
            db.map_to, 'users', tablename='users'
        table = Table('users', db._metadata, Column('id', Integer, primary_key=True))
        assert_raises_message(
            sqlsoup.ArgumentError,
            "'tablename' argument must be a string.",
            db.map_to, 'users', tablename=table
        table = Table('users', db._metadata, Column('id', Integer, primary_key=True))
        assert_raises_message(
            sqlsoup.ArgumentError,
            "'tablename' and 'selectable' arguments are mutually exclusive",
            db.map_to, 'users', tablename='users', selectable=table
        table = Table('users', db._metadata, Column('id', Integer))
        assert_raises_message(
            sqlsoup.SQLSoupError,
            "table 'users' does not have a primary ",
            db.map_to, 'users', selectable=table

src/a/l/alembic-0.6.4/tests/test_revision_paths.py   alembic(Download)
from tests import clear_staging_env, staging_env, eq_, \
    assert_raises_message
from alembic import util
 
env = None
def test_invalid_relative_upgrade_path():
    assert_raises_message(
        util.CommandError,
        "Relative revision -2 didn't produce 2 migrations",
        env._upgrade_revs, "-2", b.revision
    )
 
    assert_raises_message(
        util.CommandError,
def test_invalid_relative_downgrade_path():
    assert_raises_message(
        util.CommandError,
        "Relative revision -5 didn't produce 5 migrations",
        env._downgrade_revs, "-5", b.revision
    )
 
    assert_raises_message(
        util.CommandError,

src/a/l/alembic-HEAD/tests/test_revision_paths.py   alembic(Download)
from tests import clear_staging_env, staging_env, eq_, \
    assert_raises_message
from alembic import util
 
env = None
def test_invalid_relative_upgrade_path():
    assert_raises_message(
        util.CommandError,
        "Relative revision -2 didn't produce 2 migrations",
        env._upgrade_revs, "-2", b.revision
    )
 
    assert_raises_message(
        util.CommandError,
def test_invalid_relative_downgrade_path():
    assert_raises_message(
        util.CommandError,
        "Relative revision -5 didn't produce 5 migrations",
        env._downgrade_revs, "-5", b.revision
    )
 
    assert_raises_message(
        util.CommandError,

src/a/l/alembic-0.6.4/tests/test_sqlite.py   alembic(Download)
from tests import op_fixture, assert_raises_message
from alembic import op
from sqlalchemy import Integer, Column,  Boolean
from sqlalchemy.sql import column
 
def test_add_explicit_constraint():
    context = op_fixture('sqlite')
    assert_raises_message(
        NotImplementedError,
        "No support for ALTER of constraints in SQLite dialect",
def test_drop_explicit_constraint():
    context = op_fixture('sqlite')
    assert_raises_message(
        NotImplementedError,
        "No support for ALTER of constraints in SQLite dialect",

src/a/l/alembic-HEAD/tests/test_sqlite.py   alembic(Download)
from tests import op_fixture, assert_raises_message
from alembic import op
from sqlalchemy import Integer, Column,  Boolean
from sqlalchemy.sql import column
 
def test_add_explicit_constraint():
    context = op_fixture('sqlite')
    assert_raises_message(
        NotImplementedError,
        "No support for ALTER of constraints in SQLite dialect",
def test_drop_explicit_constraint():
    context = op_fixture('sqlite')
    assert_raises_message(
        NotImplementedError,
        "No support for ALTER of constraints in SQLite dialect",