mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
* More refactoring of cli.py break up code from cli.py (now in jrnl.py) up into smaller functions get rid of export mode move --encrypt and --decrypt to commands.py clean up the help screen even more update flag name for import * reorganize code, move around lots of functions * clean up import statements * move run function out of cli and into jrnl * rename confusingly named function * move editor function into editor file * rename parse_args.py to args.py to make room for more args functions * Fix error in test suite for windows I accidentally flipped the conditional, so this fixes it. Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com> * Update app description on help screen Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
19 lines
480 B
Python
19 lines
480 B
Python
import datetime
|
|
|
|
from jrnl import time
|
|
|
|
|
|
def test_default_hour_is_added():
|
|
assert time.parse(
|
|
"2020-06-20", inclusive=False, default_hour=9, default_minute=0, bracketed=False
|
|
) == datetime.datetime(2020, 6, 20, 9)
|
|
|
|
|
|
def test_default_minute_is_added():
|
|
assert time.parse(
|
|
"2020-06-20",
|
|
inclusive=False,
|
|
default_hour=0,
|
|
default_minute=30,
|
|
bracketed=False,
|
|
) == datetime.datetime(2020, 6, 20, 0, 30)
|