summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-12-06 20:43:15 -0700
committerkotfu <kotfu@kotfu.net>2018-12-06 20:43:15 -0700
commit28317b866b12f7e27cd6e7e291fd6f59b65d0682 (patch)
treee3cd88c86ded86f9f5e3448a87bd3bbeeb6ba119 /tests/test_transcript.py
parent45436a0487938a6948b37f8cd62a6dc473f6a902 (diff)
downloadcmd2-git-28317b866b12f7e27cd6e7e291fd6f59b65d0682.tar.gz
Fix Deprecation warnings for escape sequences
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index 6f1c4be0..d7438e86 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -200,15 +200,15 @@ this is a \/multiline\/ command
( '/tmp is nice', re.escape('/tmp is nice') ),
( 'slash at end/', re.escape('slash at end/') ),
# escaped slashes
- ( 'not this slash\/ or this one\/', re.escape('not this slash/ or this one/' ) ),
+ ( r'not this slash\/ or this one\/', re.escape('not this slash/ or this one/' ) ),
# regexes
( '/.*/', '.*' ),
( 'specials ^ and + /[0-9]+/', re.escape('specials ^ and + ') + '[0-9]+' ),
- ( '/a{6}/ but not \/a{6} with /.*?/ more', 'a{6}' + re.escape(' but not /a{6} with ') + '.*?' + re.escape(' more') ),
- ( 'not \/, use /\|?/, not \/', re.escape('not /, use ') + '\|?' + re.escape(', not /') ),
+ ( r'/a{6}/ but not \/a{6} with /.*?/ more', 'a{6}' + re.escape(' but not /a{6} with ') + '.*?' + re.escape(' more') ),
+ ( r'not \/, use /\|?/, not \/', re.escape('not /, use ') + r'\|?' + re.escape(', not /') ),
# inception: slashes in our regex. backslashed on input, bare on output
- ( 'not \/, use /\/?/, not \/', re.escape('not /, use ') + '/?' + re.escape(', not /') ),
- ( 'lots /\/?/ more /.*/ stuff', re.escape('lots ') + '/?' + re.escape(' more ') + '.*' + re.escape(' stuff') ),
+ ( r'not \/, use /\/?/, not \/', re.escape('not /, use ') + '/?' + re.escape(', not /') ),
+ ( r'lots /\/?/ more /.*/ stuff', re.escape('lots ') + '/?' + re.escape(' more ') + '.*' + re.escape(' stuff') ),
])
def test_parse_transcript_expected(expected, transformed):
app = CmdLineApp()