Skip to content

test_stop_finalization: two shutdown tests fail on a MagicMock session directory #102

Description

@martinasencio-gm

Both tests in TestShutdownDoesNotOrphanTheSession fail:

  • test_calling_it_twice_saves_once
  • test_completed_work_is_saved_without_the_event_loop
TypeError: Object of type MagicMock is not JSON serializable
  when serializing dict item 'directory'

The session dict reaching the metadata write carries a MagicMock in directory, so json.dump refuses it. Looks like the fixture mocks something the save path now reads for real (or the save path started serializing a field the fixture never set up).

Pre-existing and unrelated to any recent change: reproduced in a clean clone checked out at 189b75f, with no working-tree modifications.

.venv\Scripts\python.exe -m pytest tests/test_stop_finalization.py -q

2 failed, 17 passed

Separately, tests/test_speaker_name_popup.py::TestTranscriptViewerRenameWiring::test_a_real_click_reopening_the_popup_does_not_self_close fails in a full-suite run but passes when its file is run alone — order-dependent, probably worth its own look.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions