diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index a96c9730..c406b5a5 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -86,7 +86,7 @@ def variant_dict_from_str(compose, module_str): module_info = {} # 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" - release_regex = re.compile("^(\d){14}$") + release_regex = re.compile(r"^(\d){14}$") section_start = module_str.rfind('-') module_str_first_part = module_str[section_start+1:] diff --git a/tests/test_extra_files_phase.py b/tests/test_extra_files_phase.py index 54daedb3..40925763 100644 --- a/tests/test_extra_files_phase.py +++ b/tests/test_extra_files_phase.py @@ -159,7 +159,9 @@ class TestCopyFiles(helpers.PungiTestCase): extra_files.copy_extra_files( 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(get_dir_from_scm.call_args_list, []) diff --git a/tests/test_pkgset_source_koji.py b/tests/test_pkgset_source_koji.py index 5c0a6509..f86a8dcc 100644 --- a/tests/test_pkgset_source_koji.py +++ b/tests/test_pkgset_source_koji.py @@ -465,7 +465,7 @@ class TestCorrectNVR(helpers.PungiTestCase): self.compose = helpers.DummyCompose(self.topdir, {}) self.nv = "base-runtime-f26" 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_nvr = "base-runtime:f26:20170502134116" self.new_nvrc = "base-runtime:f26:20170502134116:0123abcd"