The main_window.py file has only 12% coverage (383/435 lines missing). Need to test:
MurnauUI.__init__()- Test UI initialization- All UI creation methods (
init_ui,_create_pitch_controls,_create_filter_controls,_create_adsr_controls) - Style methods (
_get_combo_style,_get_button_style,_get_line_edit_style) - Parameter initialization (
init_parameters) - All event handlers (30+ methods like
on_gain_change,on_waveform_change, etc.) - MIDI functionality (
init_midi,toggle_midi,start_midi,stop_midi,process_midi,handle_midi_message) - OSC communication (
send_osc) - Note handling (
on_note_on,on_note_off) - Window close event handling
The widgets.py file has only 11% coverage (354/398 lines missing). Need to test:
CustomDialclass - Custom knob widget painting and value displayLabeledKnobclass - Knob with label, value conversion, MIDI CC handlingWaveformSelectorclass - Waveform selection, visualization, animationPianoKeysclass - Piano keyboard widget, mouse/keyboard input, MIDI handling
The osc_client.py file has 0% coverage (20 lines). Need to test:
OSCClient.__init__()- Initializationsend()- Sending OSC messages with synth name prefixsend_raw()- Sending raw OSC messagesset_synth_name()- Changing synth namereconnect()- Reconnecting with new IP/port
The utils/__init__.py has 0% coverage (2 lines). Need to test:
- Module imports
The dsp/__init__.py has 0% coverage (6 lines). Need to test:
get_dsp_path()- Getting DSP file paths- Error handling for unknown DSP files
The controller.py file is empty (0 bytes), so no tests needed unless content is added.
Add tests for lines 124 and 128 in melody.py (currently 95% coverage)
Add tests for lines 60 and 64 in ramp_test.py (currently 92% coverage)
- Create comprehensive test suite for
main_window.pyusing PyQt6 test utilities - Create test suite for
widgets.pywith focus on custom widget behavior - Use mocking for OSC client, MIDI interfaces, and PyQt6 components
- Create tests for
OSCClientwith mocked UDP client - Test all public methods and error conditions
- Test the
get_dsp_pathfunction - Test error handling for invalid DSP names
- Identify and test the missing lines in existing test files
- Add edge cases and error conditions
- PyQt6 Testing: Use
pytest-qtfor testing Qt widgets - Mocking: Mock external dependencies (OSC, MIDI, file I/O)
- Event Testing: Test Qt signals/slots and event handlers
- Coverage Tools: Use
pytest-covto track progress - CI Integration: Ensure tests run in CI environment
- UI tests: ~2000-2500 lines
- Utility tests: ~100-150 lines
- DSP tests: ~50 lines
- Test improvements: ~20 lines
Total: ~2200-2700 lines of test code
- Install
pytest-qtif not already installed - Start with
test_main_window.pyas it will have the biggest impact - Use the existing test patterns from
test_melody.pyas a guide - Run coverage after each test file to track progress