sixty-north / segpy

A Python package for reading and writing SEG Y files.
Other
102 stars 54 forks source link

Test that C++ extension is used when available #40

Open abingham opened 7 years ago

abingham commented 7 years ago

It would be nice to have a test verifying that the C++ extension module is used when requested. I think we should be able to use unittest.mock to do this. We would create a mock for the extension functions and then check that they were called when expected. They wouldn't have to actually do anything - and in fact I think we wouldn't even need the extension installed - but we'd only want to check that they were accessed appropriately.