summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-02-20 19:51:53 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-02-20 19:51:53 +0000
commit74ab1c57a3b575f3f44f445cdf5909855c561274 (patch)
tree01410d1e591c7dc546ed7c30f66fdc296cef56d0
parent874bd42726d94f9c3afa96e86193aab054845429 (diff)
downloadsqlalchemy-74ab1c57a3b575f3f44f445cdf5909855c561274.tar.gz
unicode fix that gets around nose's stringio usage
-rw-r--r--lib/sqlalchemy/test/testing.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/sqlalchemy/test/testing.py b/lib/sqlalchemy/test/testing.py
index 1b4e1f78c..599d79aeb 100644
--- a/lib/sqlalchemy/test/testing.py
+++ b/lib/sqlalchemy/test/testing.py
@@ -623,21 +623,11 @@ class AssertsCompiledSQL(object):
c = clause.compile(dialect=dialect, **kw)
+ param_str = repr(getattr(c, 'params', {}))
# Py3K
- ## I kid you not.
- ##
- ## 1. Doesn't work:
- ## http://mail.python.org/pipermail/python-3000/2008-February/012144.html
- ##
- ## 2. no more setdefaultencoding(). (although this is undocumented)
- ##
- ## 3. Therefore:
- ## http://docs.python.org/3.1/library/sys.html#sys.stdin
- ##
- #sys.stdout.buffer.write(("\nSQL String:\n" + str(c) + repr(getattr(c, 'params', {}))).encode('utf-8'))
- # Py2K
- print "\nSQL String:\n" + str(c) + repr(getattr(c, 'params', {}))
- # end Py2K
+ #param_str = param_str.encode('utf-8').decode('ascii', 'ignore')
+
+ print "\nSQL String:\n" + str(c) + param_str
cc = re.sub(r'[\n\t]', '', str(c))