From: Denis Laxalde Date: Tue, 2 Nov 2021 10:30:00 +0000 (+0100) Subject: Fix type of re.sub() call in sql tests X-Git-Tag: 3.0.2~4^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd80a2a2e18a7d3b914f2e443a7aaa6986b93602;p=thirdparty%2Fpsycopg.git Fix type of re.sub() call in sql tests All values of re.sub() must be of the type, here bytes. --- diff --git a/tests/test_sql.py b/tests/test_sql.py index 46d78f9e6..4deac7e2a 100644 --- a/tests/test_sql.py +++ b/tests/test_sql.py @@ -555,6 +555,6 @@ def noe(s): if isinstance(s, str): return re.sub(r"\bE'", "'", s) elif isinstance(s, bytes): - return re.sub(br"\bE'", "'", s) + return re.sub(rb"\bE'", b"'", s) else: raise TypeError(f"not dealing with {type(s).__name__}: {s}")