mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Ensure that line endings in all py files are Linux style instead of Windows (#1250)
This commit is contained in:
parent
6fc252b2c7
commit
e84bb603eb
3 changed files with 54 additions and 54 deletions
|
@ -1,19 +1,19 @@
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from jrnl.exception import JrnlError
|
from jrnl.exception import JrnlError
|
||||||
|
|
||||||
|
|
||||||
def test_config_directory_exception_message():
|
def test_config_directory_exception_message():
|
||||||
ex = JrnlError(
|
ex = JrnlError(
|
||||||
"ConfigDirectoryIsFile", config_directory_path="/config/directory/path"
|
"ConfigDirectoryIsFile", config_directory_path="/config/directory/path"
|
||||||
)
|
)
|
||||||
|
|
||||||
assert ex.message == textwrap.dedent(
|
assert ex.message == textwrap.dedent(
|
||||||
"""
|
"""
|
||||||
The path to your jrnl configuration directory is a file, not a directory:
|
The path to your jrnl configuration directory is a file, not a directory:
|
||||||
|
|
||||||
/config/directory/path
|
/config/directory/path
|
||||||
|
|
||||||
Removing this file will allow jrnl to save its configuration.
|
Removing this file will allow jrnl to save its configuration.
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
import pytest
|
import pytest
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.filterwarnings(
|
@pytest.mark.filterwarnings(
|
||||||
"ignore:.*imp module is deprecated.*"
|
"ignore:.*imp module is deprecated.*"
|
||||||
) # ansiwrap spits out an unrelated warning
|
) # ansiwrap spits out an unrelated warning
|
||||||
def test_initialize_autocomplete_runs_without_readline():
|
def test_initialize_autocomplete_runs_without_readline():
|
||||||
from jrnl import install
|
from jrnl import install
|
||||||
|
|
||||||
with mock.patch.dict(sys.modules, {"readline": None}):
|
with mock.patch.dict(sys.modules, {"readline": None}):
|
||||||
install._initialize_autocomplete() # should not throw exception
|
install._initialize_autocomplete() # should not throw exception
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from jrnl import time
|
from jrnl import time
|
||||||
|
|
||||||
|
|
||||||
def test_default_hour_is_added():
|
def test_default_hour_is_added():
|
||||||
assert time.parse(
|
assert time.parse(
|
||||||
"2020-06-20", inclusive=False, default_hour=9, default_minute=0, bracketed=False
|
"2020-06-20", inclusive=False, default_hour=9, default_minute=0, bracketed=False
|
||||||
) == datetime.datetime(2020, 6, 20, 9)
|
) == datetime.datetime(2020, 6, 20, 9)
|
||||||
|
|
||||||
|
|
||||||
def test_default_minute_is_added():
|
def test_default_minute_is_added():
|
||||||
assert (
|
assert (
|
||||||
time.parse(
|
time.parse(
|
||||||
"2020-06-20",
|
"2020-06-20",
|
||||||
inclusive=False,
|
inclusive=False,
|
||||||
default_hour=0,
|
default_hour=0,
|
||||||
default_minute=30,
|
default_minute=30,
|
||||||
bracketed=False,
|
bracketed=False,
|
||||||
)
|
)
|
||||||
== datetime.datetime(2020, 6, 20, 0, 30)
|
== datetime.datetime(2020, 6, 20, 0, 30)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue