]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Fixed a few errant ``u''`` strings that would prevent tests from passing
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 22 Mar 2014 22:48:59 +0000 (18:48 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 22 Mar 2014 22:48:59 +0000 (18:48 -0400)
in Py3.2.  Patch courtesy Arfrever Frehtes Taifersar Arahesis. fixes #2980

doc/build/changelog/changelog_09.rst
test/dialect/test_sqlite.py
test/orm/test_default_strategies.py
test/orm/test_subquery_relations.py
test/sql/test_update.py

index c4fa76e493a5cb5877b2f6f64724d6c99482688a..be3e9af65099a39471fc2f745be2ba51313c9d43 100644 (file)
 .. changelog::
     :version: 0.9.4
 
+    .. change::
+        :tags: bug, tests
+        :tickets: 2980
+
+        Fixed a few errant ``u''`` strings that would prevent tests from passing
+        in Py3.2.  Patch courtesy Arfrever Frehtes Taifersar Arahesis.
+
     .. change::
         :tags: bug, engine
         :tickets: 2985
index f2b948c63ddc7a3c1130cff3b63f06978165c48a..4099b54d765a71b0d9273710573a96fe5ff2ea10 100644 (file)
@@ -111,7 +111,7 @@ class TestTypes(fixtures.TestBase, AssertsExecutionResults):
         testing.db.execute("insert into t (d) values ('2004-05-21T00:00:00')")
         eq_(
             testing.db.execute("select * from t order by d").fetchall(),
-            [(u'2004-05-21T00:00:00',), (u'2010-10-15T12:37:00',)]
+            [('2004-05-21T00:00:00',), ('2010-10-15T12:37:00',)]
         )
         eq_(
             testing.db.execute(select([t.c.d]).order_by(t.c.d)).fetchall(),
@@ -133,7 +133,7 @@ class TestTypes(fixtures.TestBase, AssertsExecutionResults):
         testing.db.execute("insert into t (d) values ('2004|05|21')")
         eq_(
             testing.db.execute("select * from t order by d").fetchall(),
-            [(u'2004|05|21',), (u'2010|10|15',)]
+            [('2004|05|21',), ('2010|10|15',)]
         )
         eq_(
             testing.db.execute(select([t.c.d]).order_by(t.c.d)).fetchall(),
index a127f2ba5d4ba1036040a67fb6bb4c959cc0d956..49311224ded16d595f8180558f0572db9c74a08e 100644 (file)
@@ -161,14 +161,14 @@ class DefaultStrategyOptionsTest(_fixtures.FixtureTest):
         User = self.classes.User
         opt = sa.orm.lazyload('*')
         q = sess.query(User.name).options(opt)
-        eq_(q.all(), [(u'jack',), (u'ed',), (u'fred',), (u'chuck',)])
+        eq_(q.all(), [('jack',), ('ed',), ('fred',), ('chuck',)])
 
     def test_global_star_ignored_no_entities_bound(self):
         sess = self._downgrade_fixture()
         User = self.classes.User
         opt = sa.orm.Load(User).lazyload('*')
         q = sess.query(User.name).options(opt)
-        eq_(q.all(), [(u'jack',), (u'ed',), (u'fred',), (u'chuck',)])
+        eq_(q.all(), [('jack',), ('ed',), ('fred',), ('chuck',)])
 
     def test_select_with_joinedload(self):
         """Mapper load strategy defaults can be downgraded with
index f36820e70c69f4211315d52bbd3bd97a87c03c70..4958bdfd5be541a930c203aed14cf100785ccfd5 100644 (file)
@@ -1701,16 +1701,16 @@ class SubqueryloadDistinctTest(fixtures.DeclarativeMappedTest,
         rows = result.fetchall()
         if expect_distinct:
             eq_(set(tuple(t) for t in rows), set([
-                (1, u'/1.jpg', 1, 1),
-                (2, u'/2.jpg', 1, 1),
+                (1, '/1.jpg', 1, 1),
+                (2, '/2.jpg', 1, 1),
             ]))
         else:
             # oracle might not order the way we expect here
             eq_(set(tuple(t) for t in rows), set([
-                (1, u'/1.jpg', 1, 1),
-                (2, u'/2.jpg', 1, 1),
-                (1, u'/1.jpg', 1, 1),
-                (2, u'/2.jpg', 1, 1),
+                (1, '/1.jpg', 1, 1),
+                (2, '/2.jpg', 1, 1),
+                (1, '/1.jpg', 1, 1),
+                (2, '/2.jpg', 1, 1),
             ]))
 
 
index a1b64d86285f1171eac947f1505268beca2d512b..272b5fcaee16f75b5d52d004fd17a878e44c4565 100644 (file)
@@ -306,7 +306,7 @@ class UpdateFromCompileTest(_UpdateFromTestBase, fixtures.TablesTest,
                 where(users.c.id == addresses.c.user_id),
             "UPDATE users, addresses SET addresses.name=%s, "
                 "users.name=%s WHERE users.id = addresses.user_id",
-            checkparams={u'addresses_name': 'new address', 'name': 'newname'},
+            checkparams={'addresses_name': 'new address', 'name': 'newname'},
             dialect='mysql'
         )