summaryrefslogtreecommitdiff
path: root/test/sql/test_defaults.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 19:53:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 19:53:57 -0400
commit4b614b9b35cd2baddb7ca67c04bee5d70ec6a172 (patch)
tree7483cd269f5823f903f96709eb864fff9b6d9383 /test/sql/test_defaults.py
parent9716a5c45e6185c5871555722d8495880f0e8c7a (diff)
downloadsqlalchemy-4b614b9b35cd2baddb7ca67c04bee5d70ec6a172.tar.gz
- the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
Diffstat (limited to 'test/sql/test_defaults.py')
-rw-r--r--test/sql/test_defaults.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/test/sql/test_defaults.py b/test/sql/test_defaults.py
index 1c31314d8..38c56f8be 100644
--- a/test/sql/test_defaults.py
+++ b/test/sql/test_defaults.py
@@ -600,7 +600,7 @@ class AutoIncrementTest(fixtures.TablesTest):
nonai.insert().execute(data='row 1')
nonai.insert().execute(data='row 2')
assert False
- except sa.exc.DBAPIError, e:
+ except sa.exc.DBAPIError as e:
assert True
nonai.insert().execute(id=1, data='row 1')
@@ -649,7 +649,7 @@ class SequenceExecTest(fixtures.TestBase):
def _assert_seq_result(self, ret):
"""asserts return of next_value is an int"""
- assert isinstance(ret, (int, long))
+ assert isinstance(ret, int)
assert ret > 0
def test_implicit_connectionless(self):
@@ -781,7 +781,7 @@ class SequenceTest(fixtures.TestBase, testing.AssertsCompiledSQL):
]
start = seq.start or 1
inc = seq.increment or 1
- assert values == list(xrange(start, start + inc * 3, inc))
+ assert values == list(range(start, start + inc * 3, inc))
finally:
seq.drop(testing.db)
@@ -1156,20 +1156,22 @@ class UnicodeDefaultsTest(fixtures.TestBase):
c = Column(Unicode(32))
def test_unicode_default(self):
- # Py3K
- #default = 'foo'
- # Py2K
- default = u'foo'
- # end Py2K
+# start Py3K
+ default = 'foo'
+# end Py3K
+# start Py2K
+# default = u'foo'
+# end Py2K
c = Column(Unicode(32), default=default)
def test_nonunicode_default(self):
- # Py3K
- #default = b'foo'
- # Py2K
- default = 'foo'
- # end Py2K
+# start Py3K
+ default = b'foo'
+# end Py3K
+# start Py2K
+# default = 'foo'
+# end Py2K
assert_raises_message(
sa.exc.SAWarning,
"Unicode column received non-unicode default value.",