diff options
author | Florian Bruhin <git@the-compiler.org> | 2018-08-07 17:53:26 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2018-08-19 13:04:57 +0200 |
commit | 7c904267a9100a4b85ba1140c1b32f2c27ecc0e4 (patch) | |
tree | 7f005ced7f39c68ac66e49b0de83a4d4188d6d5f | |
parent | 4f4c3b4485ef092614689f396e51ac1921e62b0d (diff) | |
download | qutebrowser-7c904267a9100a4b85ba1140c1b32f2c27ecc0e4.tar.gz qutebrowser-7c904267a9100a4b85ba1140c1b32f2c27ecc0e4.zip |
Fix lineparser tests
(cherry picked from commit 9eeaa4f45d9f7244bf13d11d84cc8fb0d1b45acb)
-rw-r--r-- | tests/unit/misc/test_lineparser.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/unit/misc/test_lineparser.py b/tests/unit/misc/test_lineparser.py index c3624cc1d..10575e676 100644 --- a/tests/unit/misc/test_lineparser.py +++ b/tests/unit/misc/test_lineparser.py @@ -37,21 +37,11 @@ class TestBaseLineParser: """Fixture providing a BaseLineParser.""" return lineparsermod.BaseLineParser(self.CONFDIR, self.FILENAME) - def test_prepare_save_existing(self, mocker, lineparser): - """Test if _prepare_save does what it's supposed to do.""" - os_mock = mocker.patch('qutebrowser.misc.lineparser.os') - os_mock.path.exists.return_value = True - - lineparser._prepare_save() - assert not os_mock.makedirs.called - def test_prepare_save_missing(self, mocker, lineparser): """Test if _prepare_save does what it's supposed to do.""" os_mock = mocker.patch('qutebrowser.misc.lineparser.os') - os_mock.path.exists.return_value = False - lineparser._prepare_save() - os_mock.makedirs.assert_called_with(self.CONFDIR, 0o755) + os_mock.makedirs.assert_called_with(self.CONFDIR, 0o755, exist_ok=True) def test_double_open(self, mocker, lineparser): """Test if _open refuses reentry.""" |