Skip to main content
2 events
when toggle format what by license comment
Jan 18, 2021 at 10:54 comment added Agent49 You are right, that I test the compatibility between _decode and _encode through their public interfaces read() and write() which don't actually change._decode and _encode might change, when the objects they handle change.Your proposal would indeed make the testing easier. Howerever, I would still have to provide a proper stub_binary() to test_decode(). I understand the value of dependency injection. But I would like to provide the user of a simple interface and no variable decoder. Should I really inject the decoder only because its "better design" and easier to test?
Jan 16, 2021 at 18:13 history answered VoiceOfUnreason CC BY-SA 4.0