mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Run poe format
This commit is contained in:
parent
e94c383e66
commit
0b70eab35e
1 changed files with 6 additions and 2 deletions
|
@ -12,7 +12,9 @@ from jrnl.editor import read_template_file
|
|||
from jrnl.exception import JrnlException
|
||||
|
||||
|
||||
@patch("os.getcwd", side_effect="/") # prevent failures in CI if current directory has been deleted
|
||||
@patch(
|
||||
"os.getcwd", side_effect="/"
|
||||
) # prevent failures in CI if current directory has been deleted
|
||||
@patch("builtins.open", side_effect=FileNotFoundError())
|
||||
def test_read_template_file_with_no_file_raises_exception(mock_open, mock_getcwd):
|
||||
with pytest.raises(JrnlException) as ex:
|
||||
|
@ -20,7 +22,9 @@ def test_read_template_file_with_no_file_raises_exception(mock_open, mock_getcwd
|
|||
assert isinstance(ex.value, JrnlException)
|
||||
|
||||
|
||||
@patch("os.getcwd", side_effect="/") # prevent failures in CI if current directory has been deleted
|
||||
@patch(
|
||||
"os.getcwd", side_effect="/"
|
||||
) # prevent failures in CI if current directory has been deleted
|
||||
@patch("builtins.open", new_callable=mock_open, read_data="template text")
|
||||
def test_read_template_file_with_valid_file_returns_text(mock_file, mock_getcwd):
|
||||
assert read_template_file("valid_file.txt") == "template text"
|
||||
|
|
Loading…
Add table
Reference in a new issue