aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2018-10-14 11:17:43 +0200
committerGuido Günther <agx@sigxcpu.org>2018-10-15 10:15:08 +0200
commit6b1342253eecd83e514400fccc531205450b13d3 (patch)
tree44180789a4991c356740dbd2212b548ec35e7368 /tests
parent497addcb69ddb53199c75d29004239e1cbb8495a (diff)
Fix flake8's W605 (invalid escape sequence)
See also https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
Diffstat (limited to 'tests')
-rw-r--r--tests/08_test_patch.py2
-rw-r--r--tests/11_test_dch_main.py4
-rw-r--r--tests/18_test_Config.py4
-rw-r--r--tests/23_test_dch_extract_bts_cmds.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/08_test_patch.py b/tests/08_test_patch.py
index b4ba2b8f..c0f3e5ce 100644
--- a/tests/08_test_patch.py
+++ b/tests/08_test_patch.py
@@ -48,7 +48,7 @@ class TestDep3Patch(unittest.TestCase):
patchfile = os.path.join(self.data_dir, "dep3-iso8859-1.patch")
self.assertTrue(os.path.exists(patchfile))
p = Dep3Patch(patchfile)
- self.assertEqual('Replace all -- in man page by \-\- to make lintian happy.', p.subject)
+ self.assertEqual(r'Replace all -- in man page by \-\- to make lintian happy.', p.subject)
self.assertEqual("Roland Rosenfeld", p.author)
self.assertEqual("roland@debian.org", p.email)
self.assertEqual("", p.long_desc)
diff --git a/tests/11_test_dch_main.py b/tests/11_test_dch_main.py
index 7fc82600..14cf5939 100644
--- a/tests/11_test_dch_main.py
+++ b/tests/11_test_dch_main.py
@@ -371,7 +371,7 @@ class TestScriptDch(DebianGitTestRepo):
msg="""test non-debian closes 1\n\nCloses: EX-123""")
self.add_file("closes1", "test file",
msg="""test non-debian closes 2\n\nCloses: EX-5678""")
- options = ["--meta", '--meta-closes-bugnum=ex-\d+']
+ options = ["--meta", r'--meta-closes-bugnum=ex-\d+']
lines = self.run_dch(options)
self.assertIn(""" * test non-debian closes 1 (Closes: EX-123)\n""",
lines)
@@ -383,7 +383,7 @@ class TestScriptDch(DebianGitTestRepo):
msg="""test non-debian closes 1\n\nExample: EX-123""")
self.add_file("closes1", "test file",
msg="""test non-debian closes 2\n\nExample: EX-5678""")
- options = ["--meta", '--meta-closes-bugnum=ex-\d+',
+ options = ["--meta", r'--meta-closes-bugnum=ex-\d+',
'--meta-closes=Example']
lines = self.run_dch(options)
self.assertIn(""" * test non-debian closes 1 (Example: EX-123)\n""",
diff --git a/tests/18_test_Config.py b/tests/18_test_Config.py
index 60cd9cff..43513c2b 100644
--- a/tests/18_test_Config.py
+++ b/tests/18_test_Config.py
@@ -50,7 +50,7 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
parser = GbpOptionParser('%scmd2' % prefix)
self.assertEqual(parser.config['single_git_override_option1'], 'single_git_override_value1')
for line in range(0, 2):
- self._check_log(line, ".*Old style config section \[git-cmd2\] found please rename to \[cmd2\]")
+ self._check_log(line, r'.*Old style config section \[git-cmd2\] found please rename to \[cmd2\]')
def test_single_gbp_override(self):
"""
@@ -60,7 +60,7 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
parser = GbpOptionParser('%scmd3' % prefix)
self.assertEqual(parser.config['single_gbp_override_option1'], 'single_gbp_override_value1')
for line in range(0, 2):
- self._check_log(line, ".*Old style config section \[gbp-cmd3\] found please rename to \[cmd3\]")
+ self._check_log(line, r'.*Old style config section \[gbp-cmd3\] found please rename to \[cmd3\]')
def test_single_git_override_disabled_deprecations(self):
"""
diff --git a/tests/23_test_dch_extract_bts_cmds.py b/tests/23_test_dch_extract_bts_cmds.py
index e1fb7e0a..bc4b5ce0 100644
--- a/tests/23_test_dch_extract_bts_cmds.py
+++ b/tests/23_test_dch_extract_bts_cmds.py
@@ -41,7 +41,7 @@ Closes: 456
"""Test non-default BTS commands. We use the example given in the
documentation manpages."""
options = OptionsStub()
- options.meta_closes_bugnum = "(?:bug)?\s*ex-\d+"
+ options.meta_closes_bugnum = r'(?:bug)?\s*ex-\d+'
lines = """This is a test commit
some more lines...