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,
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:
+from testbase import PersistTest
+import testbase
from sqlalchemy import *
from sqlalchemy.ext.proxy import AutoConnectEngine
-from testbase import PersistTest
-import testbase
import os
#
+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
+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):
+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):
-from sqlalchemy import *
import testbase
+from sqlalchemy import *
class CompileTest(testbase.AssertMixin):
"""test various mapper compilation scenarios"""
+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"""
-from sqlalchemy import *
import testbase
-
+from sqlalchemy import *
class BaseObject(object):
def __init__(self, *args, **kwargs):
-from sqlalchemy import *
import testbase
+from sqlalchemy import *
from sqlalchemy.ext.sessioncontext import SessionContext
class Jack(object):
-from sqlalchemy import *
import testbase
+from sqlalchemy import *
class PolymorphicCircularTest(testbase.PersistTest):
def setUpAll(self):
# times how long it takes to create 26000 objects
+import sys
+sys.path.insert(0, './lib/')
from sqlalchemy.attributes import *
import time
+import sys
+sys.path.insert(0, './lib/')
+
import gc
import random, string
+import sys
+sys.path.insert(0, './lib/')
+
try:
# import sqlalchemy.mods.threadlocal
pass
print "flushing"
sess.flush()
total = time.time() - now
-print "done,total time", total
\ No newline at end of file
+print "done,total time", total
from sqlalchemy import *
import sys
+sys.path.insert(0, './lib/')
engine = create_engine('sqlite://')
+++ /dev/null
-
-# 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
-
+import testbase
from sqlalchemy import *
import sys
-import testbase
class IndexTest(testbase.AssertMixin):
-
+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.
-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
+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