o
    .j                     @   s<   d Z ddlmZ ddlZddlmZmZ dd Zdd ZdS )	zIf the duration property exists, and it's not a ``default`` object but a
``timedelta`` instance, then it should return a ``duration``, not ``None``.

See https://github.com/collective/icalendar/issues/884
    )	timedeltaN)EventInvalidCalendarc                  C   sH   t  } td| d< tt | j W d   dS 1 sw   Y  dS )zThe duration is a duration.   durationN)r   r   pytestraisesr   DURATIONevent r   `/home/thesage/.local/lib/python3.10/site-packages/icalendar/tests/test_issue_884_get_duration.pytest_duration_is_a_duration   s
   "r   c                  C   s,   t  } | dtd | jtdksJ d S )Nr   r   )r   addr   r	   r
   r   r   r   test_duration_is_properly_set   s   r   )	__doc__datetimer   r   	icalendarr   r   r   r   r   r   r   r   <module>   s    