Fix PyLint W1401, anomalous backslash.

This commit is contained in:
Pedro Algarvio 2013-11-27 11:24:26 +00:00
parent d02a2bc224
commit 08c5c8e83a
3 changed files with 6 additions and 6 deletions

View file

@ -52,7 +52,7 @@ def run(command):
'''
Execute a single command and check the returns
'''
cmd = 'salt \* {0} --yaml-out -t 500 > high'.format(command)
cmd = r'salt \* {0} --yaml-out -t 500 > high'.format(command)
subprocess.call(cmd, shell=True)
data = yaml.load(open('high'))
hashes = set()

View file

@ -208,7 +208,7 @@ class MatchTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
'''
Test to see if we're supporting --doc
'''
data = self.run_salt('-d \* user')
data = self.run_salt(r'-d \* user')
self.assertIn('user.add:', data)
def test_salt_documentation_arguments_not_assumed(self):

View file

@ -147,7 +147,7 @@ class TestFind(TestCase):
ValueError, salt.utils.find.RegexOption, 'name', '(.*}'
)
option = salt.utils.find.RegexOption('name', '.*\.txt')
option = salt.utils.find.RegexOption('name', r'.*\.txt')
self.assertIs(option.match('', '', ''), None)
self.assertIs(option.match('', 'hello.txt', '').group(), 'hello.txt')
self.assertIs(option.match('', 'HELLO.TXT', ''), None)
@ -157,7 +157,7 @@ class TestFind(TestCase):
ValueError, salt.utils.find.IregexOption, 'name', '(.*}'
)
option = salt.utils.find.IregexOption('name', '.*\.txt')
option = salt.utils.find.IregexOption('name', r'.*\.txt')
self.assertIs(option.match('', '', ''), None)
self.assertIs(option.match('', 'hello.txt', '').group(), 'hello.txt')
self.assertIs(option.match('', 'HELLO.TXT', '').group(), 'HELLO.TXT')
@ -478,7 +478,7 @@ class TestFinder(TestCase):
str(finder.criteria[0].__class__)[-13:-2], 'InameOption'
)
finder = salt.utils.find.Finder({'regex': '.*\.txt'})
finder = salt.utils.find.Finder({'regex': r'.*\.txt'})
self.assertEqual(
str(finder.actions[0].__class__)[-13:-2], 'PrintOption'
)
@ -486,7 +486,7 @@ class TestFinder(TestCase):
str(finder.criteria[0].__class__)[-13:-2], 'RegexOption'
)
finder = salt.utils.find.Finder({'iregex': '.*\.txt'})
finder = salt.utils.find.Finder({'iregex': r'.*\.txt'})
self.assertEqual(
str(finder.actions[0].__class__)[-13:-2], 'PrintOption'
)