mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-07 00:36:13 +02:00
Use more generic JrnlError with messaging switchboard
This commit is contained in:
parent
75269ede85
commit
7ac104a60d
4 changed files with 37 additions and 10 deletions
13
tests/test_exception.py
Normal file
13
tests/test_exception.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from jrnl.exception import JrnlError
|
||||
|
||||
|
||||
def test_config_directory_exception_message():
|
||||
ex = JrnlError(
|
||||
"ConfigDirectoryIsFile", config_directory_path="/config/directory/path"
|
||||
)
|
||||
|
||||
assert ex.message == (
|
||||
"The path to your jrnl configuration directory is a file, not a directory:\n"
|
||||
+ "/config/directory/path\n"
|
||||
+ "Removing this file will allow jrnl to save its configuration."
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue