mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 19:48:31 +02:00
cc #1024 #1141 - Stack traces are no longer shown to users unless the --debug flag is being used - Errors, warnings, and other messages contain color as needed - Converted error messages to Enum - Adds print_msg function to centralize output (this should replace all other output in other modules) Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
21 lines
561 B
Python
21 lines
561 B
Python
import textwrap
|
|
|
|
from jrnl.exception import JrnlException
|
|
from jrnl.exception import JrnlExceptionMessage
|
|
|
|
|
|
def test_config_directory_exception_message():
|
|
ex = JrnlException(
|
|
JrnlExceptionMessage.ConfigDirectoryIsFile,
|
|
config_directory_path="/config/directory/path",
|
|
)
|
|
|
|
assert ex.message == textwrap.dedent(
|
|
"""
|
|
The path to your jrnl configuration directory is a file, not a directory:
|
|
|
|
/config/directory/path
|
|
|
|
Removing this file will allow jrnl to save its configuration.
|
|
"""
|
|
)
|