summaryrefslogtreecommitdiff
path: root/tests/test_data.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-10 12:16:02 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-10 12:16:02 -0400
commit4144f9595595f0aff458c3da5c70ff6fe8de570e (patch)
treee23422851ee3f0564b43ac3e2763805cf67f671d /tests/test_data.py
parent6c5ef77a267e244f4e50a161bd6bcf09831de943 (diff)
downloadpython-coveragepy-git-4144f9595595f0aff458c3da5c70ff6fe8de570e.tar.gz
refactor: simplify some strange string formatting
Diffstat (limited to 'tests/test_data.py')
-rw-r--r--tests/test_data.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_data.py b/tests/test_data.py
index 3adba5f0..0660591f 100644
--- a/tests/test_data.py
+++ b/tests/test_data.py
@@ -584,7 +584,7 @@ class CoverageDataInTempDirTest(CoverageTest):
assert_arcs3_data(covdata2)
def test_read_errors(self):
- msg = r"Couldn't .* '.*[/\\]{0}': \S+"
+ msg = r"Couldn't .* '.*[/\\]{}': \S+"
self.make_file("xyzzy.dat", "xyzzy")
with pytest.raises(CoverageException, match=msg.format("xyzzy.dat")):
@@ -602,7 +602,7 @@ class CoverageDataInTempDirTest(CoverageTest):
with sqlite3.connect("wrong_schema.db") as con:
con.execute("create table coverage_schema (version integer)")
con.execute("insert into coverage_schema (version) values (99)")
- msg = r"Couldn't .* '.*[/\\]{}': wrong schema: 99 instead of \d+".format("wrong_schema.db")
+ msg = r"Couldn't .* '.*[/\\]wrong_schema.db': wrong schema: 99 instead of \d+"
with pytest.raises(CoverageException, match=msg):
covdata = DebugCoverageData("wrong_schema.db")
covdata.read()
@@ -610,7 +610,7 @@ class CoverageDataInTempDirTest(CoverageTest):
with sqlite3.connect("no_schema.db") as con:
con.execute("create table foobar (baz text)")
- msg = r"Couldn't .* '.*[/\\]{}': \S+".format("no_schema.db")
+ msg = r"Couldn't .* '.*[/\\]no_schema.db': \S+"
with pytest.raises(CoverageException, match=msg):
covdata = DebugCoverageData("no_schema.db")
covdata.read()