debrief / pepys-import

Support library for Pepys maritime data analysis environment
https://pepys-import.readthedocs.io/
Apache License 2.0
5 stars 5 forks source link

Introduce mockito for mocking in tests #860

Open robintw opened 3 years ago

robintw commented 3 years ago

I recently came across the mockito library for creating mocks as part of tests. We use quite a lot of mocks, and the way we create them (using the built-in Python libraries for doing so) can be fairly confusing at times, and are potentially rather fragile. This library looks like a far nicer way to create mocks, and so we should consider starting to use this - and potentially migrating some of our old tests to use this.

There is a good walkthrough on how the library works.

IanMayo commented 3 years ago

Yes, it looks good, and may reduce the volume of test code we need to create/maintain.