Skip to content

fix(tests): merge fixture always runs merge_func; merge_cli has path and output bugs #311

@SashankBhamidi

Description

@SashankBhamidi

Three bugs in tests/conftest.py mean the CLI code path is never actually tested.

1. merge fixture ignores its parameter

@pytest.fixture(params=[merge_cli, merge_func])
def merge():
    return merge_func  # always returns merge_func regardless of param

All [merge_cli] test variants silently run merge_func instead.

2. merge_cli has a typo in the .ics suffix

calendar += "/.ics"  # should be ".ics"

3. merge_cli reads stdout instead of the output file

return icalendar.Calendar.from_ical(result.output)

result.output is the success message ("Successfully merged calendars into merged_calendar.ics\n"), not ICS data. The merged calendar is written to a file, not stdout.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions