14 lines
451 B
Python
14 lines
451 B
Python
import datetime
|
|
|
|
import pytest
|
|
|
|
from obsidian_import import obsidian
|
|
|
|
from .test_obsidian_vault import EXAMPLES, EXAMPLE_DATE, EXAMPLE_TIMEZONE
|
|
|
|
@pytest.mark.parametrize('event', EXAMPLES)
|
|
def test_format_preserves_information(event: obsidian.Event):
|
|
formatted = obsidian.format_event_string(event, EXAMPLE_TIMEZONE)
|
|
assert obsidian.parse_event_string(formatted, EXAMPLE_DATE,
|
|
EXAMPLE_TIMEZONE) == event
|