summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-06-17 03:20:09 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-06-17 03:20:09 +0100
commit30d89da4fa1f06025875be3c5c3540d9ab76b785 (patch)
treeca5b27f76525587d687715828afa087238de4069 /tests
parentd72efd2fa8a4a2f3d1bfe1a998a33f13d45c1f3f (diff)
downloadpsycopg2-30d89da4fa1f06025875be3c5c3540d9ab76b785.tar.gz
Ignore spurious output in test with Python debug build
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_connection.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_connection.py b/tests/test_connection.py
index d88e853..42a406c 100755
--- a/tests/test_connection.py
+++ b/tests/test_connection.py
@@ -22,6 +22,7 @@
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
+import re
import os
import sys
import time
@@ -1569,6 +1570,8 @@ while True:
stdout=sp.PIPE, stderr=sp.PIPE)
(out, err) = proc.communicate()
self.assertNotEqual(proc.returncode, 0)
+ # Strip [NNN refs] from output
+ err = re.sub(br'\[[^\]]+\]', b'', err).strip()
self.assert_(not err, err)