Skip to content

Commit 1ba4c5c

Browse files
committed
🧪 test: format_now
1 parent 0a8ee07 commit 1ba4c5c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_time.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ def test_format():
1616

1717
def test_timestamp():
1818
assert useDateTime.timestamp(datetime(2022, 2, 1, 0, 0, 0, tzinfo=timezone.utc)) == 1643673600
19+
20+
21+
def test_format_now():
22+
assert useDateTime.format_now() == useDateTime.format(datetime.now())
23+
assert useDateTime.format_now(fmt="%Y-%m-%d") == useDateTime.format(datetime.now(), "%Y-%m-%d")

0 commit comments

Comments
 (0)