This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, master has been updated
via 54828276f33faf5bfb476ab88435a5f797a0a870 (commit)
via 2ac082b1dd5facb42206677a1f6517a7f6a57d1d (commit)
via 2c11b31c0add7cd0607e7375278d19f75f3dd9d6 (commit)
via d9c46b2010e877b223253b8d33253e1946d64a23 (commit)
via ff90c16c89b379eedae276eaa84e4dd754dfd2de (commit)
via 85672d51645f3cd7cf1c380cb54bb87a55c29dab (commit)
via 355c1ca4fb54aacf11d8b5f30d56809ab6c53782 (commit)
via bdab935943ed4e182aa2f58a4dc26e8a77d21faf (commit)
via 4eebc57e1127273ba563c6049eef778fcbf9df0f (commit)
via 61f740796b2ca8dc5aa288e9722018dc255e8ec9 (commit)
via a06445434cef5fcf6d63bb757d766c73ff731a19 (commit)
via 780cb7c10b02fe895438ca83d09b8c0613107ff1 (commit)
via 710697321ab41ecccccdcbba35d491d3ac31eb9e (commit)
via 005e8f5ba435c68badd84742236e23af5c46eddc (commit)
from 057147e8b54498e8e464ced5187257637f9583da (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceforge.net/p/sqlobject/sqlobject/ci/54828276f33faf5bfb476ab88435a5f797a0a870
commit 54828276f33faf5bfb476ab88435a5f797a0a870
Author: Oleg Broytman <ph...@ph...>
Date: Fri Jan 13 11:02:08 2017 +0300
Fix test for Firebird: skip RLIKE test
Firebird doesn't support RLIKE.
diff --git a/sqlobject/tests/dbtest.py b/sqlobject/tests/dbtest.py
index 4279628..e4c8d29 100644
--- a/sqlobject/tests/dbtest.py
+++ b/sqlobject/tests/dbtest.py
@@ -32,16 +32,17 @@ and you can use it like::
pytest.skip("Doesn't support featureX")
"""
supportsMatrix = {
- '+exceptions': 'mysql postgres sqlite',
- '-transactions': 'mysql rdbhost',
- '-dropTableCascade': 'sybase mssql mysql',
- '-expressionIndex': 'mysql sqlite firebird mssql',
'-blobData': 'mssql rdbhost',
'-decimalColumn': 'mssql',
+ '-dropTableCascade': 'sybase mssql mysql',
'-emptyTable': 'mssql',
+ '+exceptions': 'mysql postgres sqlite',
+ '-expressionIndex': 'mysql sqlite firebird mssql',
'-limitSelect': 'mssql',
- '+schema': 'postgres',
'+memorydb': 'sqlite',
+ '+rlike': 'mysql postgres sqlite',
+ '+schema': 'postgres',
+ '-transactions': 'mysql rdbhost',
}
diff --git a/sqlobject/tests/test_select.py b/sqlobject/tests/test_select.py
index 2a1f19b..41ef0ef 100644
--- a/sqlobject/tests/test_select.py
+++ b/sqlobject/tests/test_select.py
@@ -177,6 +177,9 @@ def test_select_LIKE():
def test_select_RLIKE():
+ if not supports('rlike'):
+ pytest.skip("rlike isn't supported")
+
setupClass(IterTest)
if IterTest._connection.dbName == "sqlite":
http://sourceforge.net/p/sqlobject/sqlobject/ci/2ac082b1dd5facb42206677a1f6517a7f6a57d1d
commit 2ac082b1dd5facb42206677a1f6517a7f6a57d1d
Author: Oleg Broytman <ph...@ph...>
Date: Fri Jan 13 10:32:04 2017 +0300
Fix tests for Firebird
Rename columns whose names are reserved keywords in Firebird.
Make BLOB column 256 bytes long.
diff --git a/docs/News.rst b/docs/News.rst
index 61c5905..0ec2c98 100644
--- a/docs/News.rst
+++ b/docs/News.rst
@@ -78,8 +78,7 @@ Tests
* Drop ``Circle CI``.
* Run at Travis CI tests with Firebird backend (server version 2.5; drivers fdb
- and firebirdsql). There are major problems due to SQLObject tests use
- table/column names that are reserver words in FB.
+ and firebirdsql). There are problems with tests.
SQLObject 3.1.0
===============
diff --git a/sqlobject/include/tests/test_hashcol.py b/sqlobject/include/tests/test_hashcol.py
index 58bf23d..38b208a 100644
--- a/sqlobject/include/tests/test_hashcol.py
+++ b/sqlobject/include/tests/test_hashcol.py
@@ -23,7 +23,7 @@ else:
class HashTest(SQLObject):
- count = IntCol(alternateID=True)
+ so_count = IntCol(alternateID=True)
col1 = hashcol.HashCol()
col2 = hashcol.HashCol(hashMethod=sha256_str)
@@ -37,7 +37,7 @@ def setup():
items = []
setupClass(HashTest)
for i, s in enumerate(data):
- items.append(HashTest(count=i, col1=s, col2=s))
+ items.append(HashTest(so_count=i, col1=s, col2=s))
def test_create():
@@ -48,13 +48,13 @@ def test_create():
conn = HashTest._connection
rows = conn.queryAll("""
- SELECT count, col1, col2
+ SELECT so_count, col1, col2
FROM hash_test
- ORDER BY count
+ ORDER BY so_count
""")
- for count, col1, col2 in rows:
- assert md5_str(data[count]) == col1
- assert sha256_str(data[count]) == col2
+ for so_count, col1, col2 in rows:
+ assert md5_str(data[so_count]) == col1
+ assert sha256_str(data[so_count]) == col2
def test_select():
diff --git a/sqlobject/inheritance/tests/test_asdict.py b/sqlobject/inheritance/tests/test_asdict.py
index fadc433..5129ac2 100644
--- a/sqlobject/inheritance/tests/test_asdict.py
+++ b/sqlobject/inheritance/tests/test_asdict.py
@@ -18,7 +18,7 @@ class ManagerAD(InheritablePersonAD):
class EmployeeAD(InheritablePersonAD):
_inheritable = False
- position = StringCol()
+ so_position = StringCol()
def test_getColumns():
@@ -27,7 +27,7 @@ def test_getColumns():
for klass, columns in (
(InheritablePersonAD, ['firstName', 'lastName']),
(ManagerAD, ['department', 'firstName', 'lastName']),
- (EmployeeAD, ['firstName', 'lastName', 'position'])):
+ (EmployeeAD, ['firstName', 'lastName', 'so_position'])):
_columns = sorted(klass.sqlmeta.getColumns().keys())
assert _columns == columns
@@ -37,7 +37,7 @@ def test_asDict():
InheritablePersonAD(firstName='Oneof', lastName='Authors')
ManagerAD(firstName='ManagerAD', lastName='The', department='Dep')
EmployeeAD(firstName='Project', lastName='Leader',
- position='Project leader')
+ so_position='Project leader')
assert InheritablePersonAD.get(1).sqlmeta.asDict() == \
dict(firstName='Oneof', lastName='Authors', id=1)
@@ -45,4 +45,4 @@ def test_asDict():
dict(firstName='ManagerAD', lastName='The', department='Dep', id=2)
assert InheritablePersonAD.get(3).sqlmeta.asDict() == \
dict(firstName='Project', lastName='Leader',
- position='Project leader', id=3)
+ so_position='Project leader', id=3)
diff --git a/sqlobject/inheritance/tests/test_deep_inheritance.py b/sqlobject/inheritance/tests/test_deep_inheritance.py
index f4e3fe5..411beb2 100644
--- a/sqlobject/inheritance/tests/test_deep_inheritance.py
+++ b/sqlobject/inheritance/tests/test_deep_inheritance.py
@@ -15,7 +15,7 @@ class DIPerson(InheritableSQLObject):
class DIEmployee(DIPerson):
- position = StringCol(unique=True, length=100)
+ so_position = StringCol(unique=True, length=100)
class DIManager(DIEmployee):
@@ -47,13 +47,13 @@ def test_creation_fail2():
setupClass([DIManager, DIEmployee, DIPerson])
kwargs = {'firstName': 'John', 'lastName': 'Doe',
- 'position': 'Project Manager'}
+ 'so_position': 'Project Manager'}
DIManager(**kwargs)
persons = DIEmployee.select(DIPerson.q.firstName == 'John')
assert persons.count() == 1
kwargs = {'firstName': 'John', 'lastName': 'Doe II',
- 'position': 'Project Manager'}
+ 'so_position': 'Project Manager'}
raises(Exception, DIManager, **kwargs)
persons = DIPerson.select(DIPerson.q.firstName == 'John')
assert persons.count() == 1
@@ -62,7 +62,7 @@ def test_creation_fail2():
skip("Transactions aren't supported")
transaction = DIPerson._connection.transaction()
kwargs = {'firstName': 'John', 'lastName': 'Doe III',
- 'position': 'Project Manager'}
+ 'so_position': 'Project Manager'}
raises(Exception, DIManager, connection=transaction, **kwargs)
transaction.rollback()
transaction.begin()
@@ -75,10 +75,10 @@ def test_deep_inheritance():
setupClass([DIManager, DIEmployee, DIPerson])
manager = DIManager(firstName='Project', lastName='Manager',
- position='Project Manager')
+ so_position='Project Manager')
manager_id = manager.id
employee_id = DIEmployee(firstName='Project', lastName='Leader',
- position='Project leader', manager=manager).id
+ so_position='Project leader', manager=manager).id
DIPerson(firstName='Oneof', lastName='Authors', manager=manager)
conn = getConnection()
diff --git a/sqlobject/inheritance/tests/test_inheritance.py b/sqlobject/inheritance/tests/test_inheritance.py
index 898c6be..e1d51fa 100644
--- a/sqlobject/inheritance/tests/test_inheritance.py
+++ b/sqlobject/inheritance/tests/test_inheritance.py
@@ -15,14 +15,15 @@ class InheritablePerson(InheritableSQLObject):
class Employee(InheritablePerson):
_inheritable = False
- position = StringCol()
+ so_position = StringCol()
def setup():
setupClass(InheritablePerson)
setupClass(Employee)
- Employee(firstName='Project', lastName='Leader', position='Project leader')
+ Employee(firstName='Project', lastName='Leader',
+ so_position='Project leader')
InheritablePerson(firstName='Oneof', lastName='Authors')
@@ -66,7 +67,7 @@ def test_inheritance_select():
assert employees.count() == 0
# comparison to None needed to build the right SQL expression
- employees = Employee.select(Employee.q.position != None) # noqa
+ employees = Employee.select(Employee.q.so_position != None) # noqa
assert employees.count() == 1
persons = InheritablePerson.selectBy(firstName="Project")
@@ -104,10 +105,10 @@ def test_inheritance_select():
Employee.q.firstName)))
assert len(persons) == 1
- persons = list(Employee.select(orderBy=Employee.q.position))
+ persons = list(Employee.select(orderBy=Employee.q.so_position))
assert len(persons) == 1
- persons = list(Employee.select(orderBy=(Employee.q.position,
+ persons = list(Employee.select(orderBy=(Employee.q.so_position,
Employee.q.lastName)))
assert len(persons) == 1
diff --git a/sqlobject/tests/test_aggregates.py b/sqlobject/tests/test_aggregates.py
index 9f72300..9692632 100644
--- a/sqlobject/tests/test_aggregates.py
+++ b/sqlobject/tests/test_aggregates.py
@@ -6,28 +6,28 @@ from sqlobject.tests.dbtest import setupClass
class IntAccumulator(SQLObject):
- value = IntCol()
+ so_value = IntCol()
class FloatAccumulator(SQLObject):
- value = FloatCol()
+ so_value = FloatCol()
def test_integer():
setupClass(IntAccumulator)
- IntAccumulator(value=1)
- IntAccumulator(value=2)
- IntAccumulator(value=3)
+ IntAccumulator(so_value=1)
+ IntAccumulator(so_value=2)
+ IntAccumulator(so_value=3)
- assert IntAccumulator.select().min(IntAccumulator.q.value) == 1
- assert IntAccumulator.select().avg(IntAccumulator.q.value) == 2
- assert IntAccumulator.select().max(IntAccumulator.q.value) == 3
- assert IntAccumulator.select().sum(IntAccumulator.q.value) == 6
+ assert IntAccumulator.select().min(IntAccumulator.q.so_value) == 1
+ assert IntAccumulator.select().avg(IntAccumulator.q.so_value) == 2
+ assert IntAccumulator.select().max(IntAccumulator.q.so_value) == 3
+ assert IntAccumulator.select().sum(IntAccumulator.q.so_value) == 6
- assert IntAccumulator.select(IntAccumulator.q.value > 1).\
- max(IntAccumulator.q.value) == 3
- assert IntAccumulator.select(IntAccumulator.q.value > 1).\
- sum(IntAccumulator.q.value) == 5
+ assert IntAccumulator.select(IntAccumulator.q.so_value > 1).\
+ max(IntAccumulator.q.so_value) == 3
+ assert IntAccumulator.select(IntAccumulator.q.so_value > 1).\
+ sum(IntAccumulator.q.so_value) == 5
def floatcmp(f1, f2):
@@ -40,30 +40,30 @@ def floatcmp(f1, f2):
def test_float():
setupClass(FloatAccumulator)
- FloatAccumulator(value=1.2)
- FloatAccumulator(value=2.4)
- FloatAccumulator(value=3.8)
+ FloatAccumulator(so_value=1.2)
+ FloatAccumulator(so_value=2.4)
+ FloatAccumulator(so_value=3.8)
assert floatcmp(
- FloatAccumulator.select().min(FloatAccumulator.q.value), 1.2) == 0
+ FloatAccumulator.select().min(FloatAccumulator.q.so_value), 1.2) == 0
assert floatcmp(
- FloatAccumulator.select().avg(FloatAccumulator.q.value), 2.5) == 0
+ FloatAccumulator.select().avg(FloatAccumulator.q.so_value), 2.5) == 0
assert floatcmp(
- FloatAccumulator.select().max(FloatAccumulator.q.value), 3.8) == 0
+ FloatAccumulator.select().max(FloatAccumulator.q.so_value), 3.8) == 0
assert floatcmp(
- FloatAccumulator.select().sum(FloatAccumulator.q.value), 7.4) == 0
+ FloatAccumulator.select().sum(FloatAccumulator.q.so_value), 7.4) == 0
def test_many():
setupClass(IntAccumulator)
- IntAccumulator(value=1)
- IntAccumulator(value=1)
- IntAccumulator(value=2)
- IntAccumulator(value=2)
- IntAccumulator(value=3)
- IntAccumulator(value=3)
-
- attribute = IntAccumulator.q.value
+ IntAccumulator(so_value=1)
+ IntAccumulator(so_value=1)
+ IntAccumulator(so_value=2)
+ IntAccumulator(so_value=2)
+ IntAccumulator(so_value=3)
+ IntAccumulator(so_value=3)
+
+ attribute = IntAccumulator.q.so_value
assert list(IntAccumulator.select().accumulateMany(
("MIN", attribute), ("AVG", attribute), ("MAX", attribute),
("COUNT", attribute), ("SUM", attribute)
diff --git a/sqlobject/tests/test_basic.py b/sqlobject/tests/test_basic.py
index c44eb24..d9d1a2e 100644
--- a/sqlobject/tests/test_basic.py
+++ b/sqlobject/tests/test_basic.py
@@ -320,13 +320,13 @@ def test_nonexisting_attr():
class SOTestSO12(SQLObject):
name = StringCol()
- value = IntCol(defaultSQL='1')
+ so_value = IntCol(defaultSQL='1')
def test_defaultSQL():
setupClass(SOTestSO12)
test = SOTestSO12(name="test")
- assert test.value == 1
+ assert test.so_value == 1
def test_connection_override():
diff --git a/sqlobject/tests/test_blob.py b/sqlobject/tests/test_blob.py
index b8c2e3c..8c43d8a 100644
--- a/sqlobject/tests/test_blob.py
+++ b/sqlobject/tests/test_blob.py
@@ -10,7 +10,7 @@ from sqlobject.tests.dbtest import setupClass, supports
class ImageData(SQLObject):
- image = BLOBCol(default=b'emptydata', length=65535)
+ image = BLOBCol(default=b'emptydata', length=256)
def test_BLOBCol():
diff --git a/sqlobject/tests/test_create_drop.py b/sqlobject/tests/test_create_drop.py
index c0f6638..9f2e694 100644
--- a/sqlobject/tests/test_create_drop.py
+++ b/sqlobject/tests/test_create_drop.py
@@ -9,7 +9,7 @@ class SOTestCreateDrop(SQLObject):
table = 'test_create_drop_table'
name = StringCol()
number = IntCol()
- time = DateTimeCol()
+ so_time = DateTimeCol()
short = StringCol(length=10)
blobcol = BLOBCol()
diff --git a/sqlobject/tests/test_cyclic_reference.py b/sqlobject/tests/test_cyclic_reference.py
index 5a4fede..7350216 100644
--- a/sqlobject/tests/test_cyclic_reference.py
+++ b/sqlobject/tests/test_cyclic_reference.py
@@ -10,7 +10,7 @@ class SOTestCyclicReferenceA(SQLObject):
table = 'test_cyclic_reference_a_table'
name = StringCol()
number = IntCol()
- time = DateTimeCol()
+ so_time = DateTimeCol()
short = StringCol(length=10)
blobcol = BLOBCol()
fkeyb = ForeignKey('SOTestCyclicReferenceB')
@@ -22,7 +22,7 @@ class SOTestCyclicReferenceB(SQLObject):
table = 'test_cyclic_reference_b_table'
name = StringCol()
number = IntCol()
- time = DateTimeCol()
+ so_time = DateTimeCol()
short = StringCol(length=10)
blobcol = BLOBCol()
fkeya = ForeignKey('SOTestCyclicReferenceA')
diff --git a/sqlobject/tests/test_groupBy.py b/sqlobject/tests/test_groupBy.py
index e92d98e..4291c03 100644
--- a/sqlobject/tests/test_groupBy.py
+++ b/sqlobject/tests/test_groupBy.py
@@ -10,18 +10,18 @@ from sqlobject.tests.dbtest import getConnection, setupClass
class GroupbyTest(SQLObject):
name = StringCol()
- value = IntCol()
+ so_value = IntCol()
def test_groupBy():
setupClass(GroupbyTest)
- GroupbyTest(name='a', value=1)
- GroupbyTest(name='a', value=2)
- GroupbyTest(name='b', value=1)
+ GroupbyTest(name='a', so_value=1)
+ GroupbyTest(name='a', so_value=2)
+ GroupbyTest(name='b', so_value=1)
connection = getConnection()
select = Select(
- [GroupbyTest.q.name, func.COUNT(GroupbyTest.q.value)],
+ [GroupbyTest.q.name, func.COUNT(GroupbyTest.q.so_value)],
groupBy=GroupbyTest.q.name,
orderBy=GroupbyTest.q.name)
sql = connection.sqlrepr(select)
@@ -31,15 +31,15 @@ def test_groupBy():
def test_groupBy_list():
setupClass(GroupbyTest)
- GroupbyTest(name='a', value=1)
- GroupbyTest(name='a', value=2)
- GroupbyTest(name='b', value=1)
+ GroupbyTest(name='a', so_value=1)
+ GroupbyTest(name='a', so_value=2)
+ GroupbyTest(name='b', so_value=1)
connection = getConnection()
select = Select(
- [GroupbyTest.q.name, GroupbyTest.q.value],
- groupBy=[GroupbyTest.q.name, GroupbyTest.q.value],
- orderBy=[GroupbyTest.q.name, GroupbyTest.q.value])
+ [GroupbyTest.q.name, GroupbyTest.q.so_value],
+ groupBy=[GroupbyTest.q.name, GroupbyTest.q.so_value],
+ orderBy=[GroupbyTest.q.name, GroupbyTest.q.so_value])
sql = connection.sqlrepr(select)
rows = list(connection.queryAll(sql))
assert [tuple(t) for t in rows] == [('a', 1), ('a', 2), ('b', 1)]
diff --git a/sqlobject/tests/test_picklecol.py b/sqlobject/tests/test_picklecol.py
index f4eb932..d589c69 100644
--- a/sqlobject/tests/test_picklecol.py
+++ b/sqlobject/tests/test_picklecol.py
@@ -18,7 +18,7 @@ class PickleData:
class PickleContainer(SQLObject):
- pickledata = PickleCol(default=None, length=65535)
+ pickledata = PickleCol(default=None, length=256)
def test_pickleCol():
diff --git a/sqlobject/tests/test_sqlbuilder.py b/sqlobject/tests/test_sqlbuilder.py
index f4e51dd..64170b1 100644
--- a/sqlobject/tests/test_sqlbuilder.py
+++ b/sqlobject/tests/test_sqlbuilder.py
@@ -7,7 +7,7 @@ from sqlobject.tests.dbtest import getConnection, raises, setupClass
... 919 lines suppressed ...
hooks/post-receive
--
SQLObject development repository
|