inserting './lib/' into sys.path since PYTHONPATH no longer straightforward with latest setuptools

This commit is contained in:
Mike Bayer 2006-06-29 00:28:55 +00:00
parent 2fb9221b79
commit b3927fbb88
21 changed files with 37 additions and 31 deletions

View File

@ -1,6 +1,8 @@
0.2.5
- fixed endless loop bug in select_by(), if the traversal hit
two mappers that referenced each other
- upgraded all unittests to insert './lib/' into sys.path,
working around new setuptools PYTHONPATH-killing behavior
0.2.4
- try/except when the mapper sets init.__name__ on a mapped class,

View File

@ -4,7 +4,10 @@ cd into the SQLAlchemy distribution directory.
Set up the PYTHONPATH:
export PYTHONPATH=./lib/:./test/
export PYTHONPATH=./test/
The unittest framework will automatically prepend './lib/' to sys.path. this forces the local
version to run, bypassing any setuptools-installed installations.
To run all tests:

View File

@ -1,2 +1 @@

View File

@ -1,8 +1,8 @@
from testbase import PersistTest
import testbase
from sqlalchemy import *
from sqlalchemy.ext.proxy import AutoConnectEngine
from testbase import PersistTest
import testbase
import os
#

View File

@ -1,10 +1,10 @@
from testbase import PersistTest
import testbase
import os
from sqlalchemy import *
from sqlalchemy.ext.proxy import ProxyEngine
from testbase import PersistTest
import testbase
#
# Define an engine, table and mapper at the module level, to show that the

View File

@ -1,11 +1,11 @@
from testbase import PersistTest
import testbase
import sqlalchemy.ansisql as ansisql
from sqlalchemy import *
from sqlalchemy.exceptions import NoSuchTableError
from testbase import PersistTest
import testbase
import unittest, re, StringIO
class ReflectionTest(PersistTest):

View File

@ -1,12 +1,11 @@
import testbase
from sqlalchemy.ext.activemapper import ActiveMapper, column, one_to_many, one_to_one, objectstore
from sqlalchemy import and_, or_, clear_mappers
from sqlalchemy import ForeignKey, String, Integer, DateTime
from datetime import datetime
import unittest
import sqlalchemy.ext.activemapper as activemapper
import testbase
class testcase(testbase.PersistTest):
def setUpAll(self):

View File

@ -1,5 +1,5 @@
from sqlalchemy import *
import testbase
from sqlalchemy import *
class CompileTest(testbase.AssertMixin):
"""test various mapper compilation scenarios"""

View File

@ -1,6 +1,6 @@
import testbase
from sqlalchemy import *
from datetime import datetime
import testbase
class InheritTest(testbase.AssertMixin):
"""tests some various inheritance round trips involving a particular set of polymorphic inheritance relationships"""

View File

@ -1,6 +1,5 @@
from sqlalchemy import *
import testbase
from sqlalchemy import *
class BaseObject(object):
def __init__(self, *args, **kwargs):

View File

@ -1,5 +1,5 @@
from sqlalchemy import *
import testbase
from sqlalchemy import *
from sqlalchemy.ext.sessioncontext import SessionContext
class Jack(object):

View File

@ -1,5 +1,5 @@
from sqlalchemy import *
import testbase
from sqlalchemy import *
class PolymorphicCircularTest(testbase.PersistTest):
def setUpAll(self):

View File

@ -1,4 +1,6 @@
# times how long it takes to create 26000 objects
import sys
sys.path.insert(0, './lib/')
from sqlalchemy.attributes import *
import time

View File

@ -1,3 +1,6 @@
import sys
sys.path.insert(0, './lib/')
import gc
import random, string

View File

@ -1,3 +1,6 @@
import sys
sys.path.insert(0, './lib/')
try:
# import sqlalchemy.mods.threadlocal
pass
@ -70,4 +73,4 @@ print len([s for s in sess])
print "flushing"
sess.flush()
total = time.time() - now
print "done,total time", total
print "done,total time", total

View File

@ -1,5 +1,6 @@
from sqlalchemy import *
import sys
sys.path.insert(0, './lib/')
engine = create_engine('sqlite://')

View File

@ -1,7 +0,0 @@
# test merging a composed object.
# test that when cascading an operation, like "merge", lazy-loaded scalar and list attributes that werent already loaded on the given object remain not loaded.
# test putting an object in session A, "moving" it to session B, insure its in B and not in A

View File

@ -1,6 +1,6 @@
import testbase
from sqlalchemy import *
import sys
import testbase
class IndexTest(testbase.AssertMixin):

View File

@ -1,9 +1,8 @@
from testbase import PersistTest
import testbase
from sqlalchemy import *
from sqlalchemy.databases import sqlite, postgres, mysql, oracle
from testbase import PersistTest
import unittest, re
import testbase
# the select test now tests almost completely with TableClause/ColumnClause objects,
# which are free-roaming table/column objects not attached to any database.

View File

@ -1,7 +1,7 @@
from sqlalchemy import *
import string,datetime, re, sys
from testbase import PersistTest, AssertMixin
import testbase
from sqlalchemy import *
import string,datetime, re, sys
import sqlalchemy.engine.url as url
import sqlalchemy.types

View File

@ -1,10 +1,13 @@
import sys
sys.path.insert(0, './lib/')
import unittest
import StringIO
import sqlalchemy.engine as engine
import sqlalchemy.ext.proxy as proxy
import sqlalchemy.pool as pool
#import sqlalchemy.schema as schema
import re, sys
import re
import sqlalchemy
import optparse