jrnl/tests/unit/test_time.py
dependabot[bot] a8f0b18219
Bump black from 21.12b0 to 22.1.0 (#1404)
* Bump black from 21.12b0 to 22.1.0

Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits/22.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run make format

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2022-02-05 12:04:06 -08:00

19 lines
461 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)