From 790032d2316989eb5b36af2569408ce1e1296015 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 16 Jul 2011 22:24:31 -0400 Subject: Use raw-string syntax for other Windows pathnames inserted to Python. --- indra/llcommon/tests/llsdserialize_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llcommon/tests') diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index 81de64930f..7ce7ada29e 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -1827,7 +1827,8 @@ namespace tut " for item in iterable:\n" " yield llsd.parse(item)\n" << pydata << - "verify(parse_each(open('" << file.getName() << "')))\n"); + // Don't forget raw-string syntax for Windows pathnames. + "verify(parse_each(open(r'" << file.getName() << "')))\n"); } template<> template<> @@ -1852,8 +1853,9 @@ namespace tut "has several\n" "lines.''',\n" "]\n" + // Don't forget raw-string syntax for Windows pathnames. // N.B. Using 'print' implicitly adds newlines. - "with open('" << file.getName() << "', 'w') as f:\n" + "with open(r'" << file.getName() << "', 'w') as f:\n" " for item in DATA:\n" " print >>f, llsd.format_notation(item)\n"); -- cgit v1.2.3