Remove invalid escape sequences

This emits a warning on Python 3.8. Let's just fix it.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2019-05-15 15:47:44 +02:00
parent cfb7b71fca
commit d0e8472ab5
3 changed files with 5 additions and 3 deletions

View File

@ -86,7 +86,7 @@ def variant_dict_from_str(compose, module_str):
module_info = {} module_info = {}
# The regex is matching a string which should represent the release number # The regex is matching a string which should represent the release number
# of a module. The release number is in format: "%Y%m%d%H%M%S" # of a module. The release number is in format: "%Y%m%d%H%M%S"
release_regex = re.compile("^(\d){14}$") release_regex = re.compile(r"^(\d){14}$")
section_start = module_str.rfind('-') section_start = module_str.rfind('-')
module_str_first_part = module_str[section_start+1:] module_str_first_part = module_str[section_start+1:]

View File

@ -159,7 +159,9 @@ class TestCopyFiles(helpers.PungiTestCase):
extra_files.copy_extra_files( extra_files.copy_extra_files(
compose, [cfg], 'x86_64', compose.variants['Server'], package_sets) compose, [cfg], 'x86_64', compose.variants['Server'], package_sets)
self.assertRegexpMatches(str(ctx.exception), 'No.*package.*matching bad-server\*.*') self.assertRegexpMatches(
str(ctx.exception), r'No.*package.*matching bad-server\*.*'
)
self.assertEqual(len(get_file_from_scm.call_args_list), 0) self.assertEqual(len(get_file_from_scm.call_args_list), 0)
self.assertEqual(get_dir_from_scm.call_args_list, []) self.assertEqual(get_dir_from_scm.call_args_list, [])

View File

@ -465,7 +465,7 @@ class TestCorrectNVR(helpers.PungiTestCase):
self.compose = helpers.DummyCompose(self.topdir, {}) self.compose = helpers.DummyCompose(self.topdir, {})
self.nv = "base-runtime-f26" self.nv = "base-runtime-f26"
self.nvr = "base-runtime-f26-20170502134116" self.nvr = "base-runtime-f26-20170502134116"
self.release_regex = re.compile("^(\d){14}$") self.release_regex = re.compile(r"^(\d){14}$")
self.new_nv = "base-runtime:f26" self.new_nv = "base-runtime:f26"
self.new_nvr = "base-runtime:f26:20170502134116" self.new_nvr = "base-runtime:f26:20170502134116"
self.new_nvrc = "base-runtime:f26:20170502134116:0123abcd" self.new_nvrc = "base-runtime:f26:20170502134116:0123abcd"