py3: Fix deprecation warnings
Fix the deprecation warnings while running the unit tests. Python3 interprets string literals as unicode strings, so an "r" is required. Story: 2006796 Task: 42749 Signed-off-by: Charles Short <charles.short@windriver.com> Change-Id: I78362e4a8533237b8db19065d6f576121538c8e9
This commit is contained in:
parent
c7147c0c90
commit
3d8b5813f6
|
@ -644,7 +644,7 @@ def build_wrapping_formatters(objs, fields, field_labels, format_spec, add_blank
|
|||
if objs is None or len(objs) == 0:
|
||||
return {}
|
||||
|
||||
biggest_word_pattern = re.compile("[\.:,;\!\?\\ =-\_]")
|
||||
biggest_word_pattern = re.compile(r"[\.:,;\!\?\\ =-\_]")
|
||||
|
||||
def get_biggest_word(s):
|
||||
return max(biggest_word_pattern.split(s), key=len)
|
||||
|
|
|
@ -78,13 +78,13 @@ class ShellTest(utils.BaseTestCase):
|
|||
|
||||
def test_help_on_subcommand(self):
|
||||
required = [
|
||||
'.*?^usage: system host-show \[--column COLUMN\] \[--format {table,yaml,value}\]'
|
||||
'.*?<hostname or id>'
|
||||
'',
|
||||
".*?^Show host attributes.",
|
||||
'',
|
||||
".*?^Positional arguments:",
|
||||
".*?<hostname or id> Name or ID of host",
|
||||
r'.*?^usage: system host-show \[--column COLUMN\] \[--format {table,yaml,value}\]'
|
||||
r'.*?<hostname or id>'
|
||||
r'',
|
||||
r".*?^Show host attributes.",
|
||||
r'',
|
||||
r".*?^Positional arguments:",
|
||||
r".*?<hostname or id> Name or ID of host",
|
||||
]
|
||||
argstrings = [
|
||||
'help host-show',
|
||||
|
|
Loading…
Reference in New Issue