summaryrefslogtreecommitdiff
path: root/test/engine/test_logging.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-02-17 15:21:00 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-02-17 15:21:00 -0500
commitbf1d03a9e58a0256db0b1f7389e23a6d11c4a964 (patch)
treea72c257e712500fd53a33a25a81c104e560ad802 /test/engine/test_logging.py
parent591e0cf08a798fb16e0ee9b56df5c3141aa48959 (diff)
downloadsqlalchemy-bf1d03a9e58a0256db0b1f7389e23a6d11c4a964.tar.gz
- do the trailing comma logic of tuple repr() exactly
Diffstat (limited to 'test/engine/test_logging.py')
-rw-r--r--test/engine/test_logging.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/engine/test_logging.py b/test/engine/test_logging.py
index 847ba06c4..efdee8aef 100644
--- a/test/engine/test_logging.py
+++ b/test/engine/test_logging.py
@@ -69,6 +69,24 @@ class LogParamsTest(fixtures.TestBase):
)
)
+ def test_log_large_multi_parameter(self):
+ import random
+ lp1 = ''.join(chr(random.randint(52, 85)) for i in range(5))
+ lp2 = ''.join(chr(random.randint(52, 85)) for i in range(8))
+ lp3 = ''.join(chr(random.randint(52, 85)) for i in range(670))
+
+ self.eng.execute(
+ "SELECT ?, ?, ?",
+ (lp1, lp2, lp3)
+ )
+
+ eq_(
+ self.buf.buffer[1].message,
+ "('%s', '%s', '%s ... (372 characters truncated) ... %s')" % (
+ lp1, lp2, lp3[0:149], lp3[-149:]
+ )
+ )
+
def test_log_large_parameter_multiple(self):
import random
lp1 = ''.join(chr(random.randint(52, 85)) for i in range(5000))