Files
syn-chat-bot/.venv/lib/python3.9/site-packages/icalendar/tests/test_issue_802.py
Hyungi Ahn c2257d3a86 fix: 포트 충돌 회피 — note_bridge 8098, intent_service 8099
Jellyfin(8096), OrbStack(8097) 포트 충돌으로 변경.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:53:55 +09:00

55 lines
1.4 KiB
Python

"""Test the sequence and other int properies.
https://www.rfc-editor.org/rfc/rfc5545#section-3.8.7.4
https://github.com/collective/icalendar/issues/802
"""
import pytest
from icalendar import Component, Event, Journal, Todo
@pytest.fixture(params=[0, None])
def default_sequence(request):
return request.param
@pytest.fixture(params=[Event, Journal, Todo])
def component(request, default_sequence) -> Component:
"""Return a component."""
component : Component = request.param()
if default_sequence is not None:
component["SEQUENCE"] = default_sequence
return component
def test_sequence_is_0(component: Component):
"""Check the default value."""
assert component.sequence == 0
def test_increase_sequence(component: Component):
"""Check the default value."""
component.sequence += 1
assert component.sequence == 1
assert component["SEQUENCE"] == 1
def test_set_sequence(component: Component):
"""Check the default value."""
component.sequence = 400
assert component.sequence == 400
assert component["SEQUENCE"] == 400
def test_delete_sequence_default(component: Component):
"""Delete the value."""
del component.sequence
assert component.sequence == 0
def test_delete_sequence_with_value(component: Component):
"""Delete the value."""
component.sequence = 400
del component.sequence
assert component.sequence == 0