Skip to content

Commit 033d55a

Browse files
committed
Fix regex
1 parent 44e972a commit 033d55a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/disk/test_qcow2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_data_file(data_file_qcow2: Path) -> None:
6666
qcow2.image_data_file = "/absolute/path/to/nothing.qcow2"
6767
with pytest.raises(
6868
Error,
69-
match=r"data-file '/absolute/path/to/nothing.qcow2' not found \(image_data_file = '/absolute/path/to/nothing.qcow2'\)", # noqa: E501
69+
match=r"data-file '(?:[A-Z]:\\+)[/\\]+absolute[/\\]+path[/\\]+to[/\\]+nothing\.qcow2' not found \(image_data_file = '/absolute/path/to/nothing\.qcow2'\)", # noqa: E501
7070
):
7171
qcow2._open_data_file(None)
7272

@@ -137,7 +137,7 @@ def test_backing_file(backing_chain_qcow2: tuple[Path, Path, Path]) -> None:
137137
qcow2.auto_backing_file = "/absolute/path/to/nothing.qcow2"
138138
with pytest.raises(
139139
Error,
140-
match=r"backing-file '/absolute/path/to/nothing.qcow2' not found \(auto_backing_file = '/absolute/path/to/nothing.qcow2'\)", # noqa: E501
140+
match=r"backing-file '(?:[A-Z]:\\+)[/\\]+absolute[/\\]+path[/\\]+to[/\\]+nothing\.qcow2' not found \(auto_backing_file = '/absolute/path/to/nothing\.qcow2'\)", # noqa: E501
141141
):
142142
qcow2._open_backing_file(None)
143143

0 commit comments

Comments
 (0)