Skip to content

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

Open

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.

Activity

  1. abe-101 commented on Feb 24, 2026

    @abe-101
    Member

    Is there there a failing test you seeing this in?

  2. SashankBhamidi commented on Feb 24, 2026

    @SashankBhamidi
    CollaboratorAuthor

    No failing tests - that's the issue. All [merge_cli] tests silently run merge_func instead due to bug 1, so the CLI is never actually tested. Try breaking cli.py - tests still pass.

  3. abe-101 commented on Feb 24, 2026

    @abe-101
    Member

    Oof that's bad
    Can I trouble you to open up a PR demonstrating that the tests, even when broken still pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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