Skip to content

Use write mode when calling save(arrays - #60

Merged
davidkoski merged 1 commit into
ml-explore:mainfrom
rounak:main
Apr 2, 2024
Merged

davidkoski merged 1 commit into
ml-explore:mainfrom
rounak:main

Conversation

@rounak

@rounak rounak commented Apr 2, 2024 •

Copy link
Copy Markdown
Contributor

I noticed that the fopen call in save(arrays was using read mode, because of which the saving was failing. I changed it to "w" to match the other save methods. I did verify this fixes saving.

Given this is a system call, I wasn't sure how to unit test this. If there are any recommendations, let me know, will be happy to add tests.

@davidkoski davidkoski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding and fixing this!

I was thinking we don't really need tests of this as the functionality is implemented at a lower layer (which has its own tests), but then again you found an issue in the integration :-)

If you are interested for writing tests for it, something like this requires an integration test -- something that:

Let's merge this now and if you are up for it add the test case in another PR.

Thanks!

@davidkoski
davidkoski merged commit bd8666d into ml-explore:main Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants