summaryrefslogtreecommitdiff
path: root/tests/unit/utils/test_utils.py
diff options
context:
space:
mode:
authorGeorge Edward Bulmer <gebulmer@googlemail.com>2017-12-12 15:07:37 +0000
committerGeorge Edward Bulmer <gebulmer@googlemail.com>2017-12-12 15:07:37 +0000
commit9ca6baca4f624e99e76eae39b1bfe306525d1750 (patch)
tree88bc56b4b55eff073ecd556df510599137730d39 /tests/unit/utils/test_utils.py
parentb07a4c8c2864d1ab54fdb4e58f36144e92eb0f8e (diff)
downloadqutebrowser-9ca6baca4f624e99e76eae39b1bfe306525d1750.tar.gz
qutebrowser-9ca6baca4f624e99e76eae39b1bfe306525d1750.zip
Modify instances of re.match to fullmatch or search.
This applies the changes to the tests directory only.
Diffstat (limited to 'tests/unit/utils/test_utils.py')
-rw-r--r--tests/unit/utils/test_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index f6eef7f4f..66f5e852d 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -863,7 +863,7 @@ class TestOpenFile:
cmdline = '{} -c pass'.format(executable)
utils.open_file('/foo/bar', cmdline)
result = caplog.records[0].message
- assert re.match(
+ assert re.fullmatch(
r'Opening /foo/bar with \[.*python.*/foo/bar.*\]', result)
@pytest.mark.not_frozen
@@ -872,7 +872,7 @@ class TestOpenFile:
cmdline = '{} -c pass {{}} raboof'.format(executable)
utils.open_file('/foo/bar', cmdline)
result = caplog.records[0].message
- assert re.match(
+ assert re.fullmatch(
r"Opening /foo/bar with \[.*python.*/foo/bar.*'raboof'\]", result)
@pytest.mark.not_frozen
@@ -882,7 +882,7 @@ class TestOpenFile:
config_stub.val.downloads.open_dispatcher = cmdline
utils.open_file('/foo/bar')
result = caplog.records[1].message
- assert re.match(
+ assert re.fullmatch(
r"Opening /foo/bar with \[.*python.*/foo/bar.*\]", result)
def test_system_default_application(self, caplog, config_stub, mocker):
@@ -890,7 +890,7 @@ class TestOpenFile:
new_callable=mocker.Mock)
utils.open_file('/foo/bar')
result = caplog.records[0].message
- assert re.match(
+ assert re.fullmatch(
r"Opening /foo/bar with the system application", result)
m.assert_called_with(QUrl('file:///foo/bar'))