[gobject-introspection] tests: Fix python2/3 difference with respect to rawunicodeescape
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] tests: Fix python2/3 difference with respect to rawunicodeescape
- Date: Wed, 30 Sep 2015 03:36:21 +0000 (UTC)
commit 67a86420d4ffd394c2834fe3bf0a04f72a00283c
Author: Colin Walters <walters verbum org>
Date: Tue Sep 29 23:33:00 2015 -0400
tests: Fix python2/3 difference with respect to rawunicodeescape
Apparently Python 2 still tries to interpret r"\u" in some
circumstances?
tests/scanner/test_transformer.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/scanner/test_transformer.py b/tests/scanner/test_transformer.py
index e766d61..b45f532 100644
--- a/tests/scanner/test_transformer.py
+++ b/tests/scanner/test_transformer.py
@@ -51,7 +51,7 @@ class TestIdentifierFilter(unittest.TestCase):
r"-e 's/^test_t$/TestContext/' " \
r"-e 's/\(.*\)_t$/\1/' " \
r"-e 's/^test_/Test_/' " \
- r"-e 's/_\([a-z]\)/\u\1/g'"
+ r"-e 's/_\([a-z]\)/" + '\\u' + r"\1/g'"
namespace = ast.Namespace('Test', '1.0')
xformer = Transformer(namespace, identifier_filter_cmd=cmd)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]