You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick check in here, @GonzaFP 👋 Do we need to add all of these tests, or are these functionalities being covered by src/scribe_data/cli/convert/to_json.py? Just checking as by the looks of this this covers one extra line of code, and 120 lines of tests for covering one line of code is a bit much. Feel free to simplify them down to just calling the JSON conversion from the wrapper! Looks like we also need a similar test that we can do convert_to_csv_or_tsv from the wrapper and then that file would be 100%.
Happy to keep these changes if they're needed, but it'd be great if you could verify if some of the tests are repeated :)
Thanks @andrewtavis for your response.
In wrapper.py, there are two conditions at the start of the function convert_wrapper that check if the output_dir is None and if input_path is None. I wrote two tests to test the conditions.
The convert_to_json function takes a language parameter of type string so I tested that too.
Should I combine all three tests into one?
PS: The prior tests of convert_to_sqlite served as an inspiration. I see that separate tests were written for each scenario.
I will work on convert_to_csv_or_tsv after convert_to_json is finished.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist
pytestcommand as directed in the testing section of the contributing guideDescription
Added tests for
convert_to_jsonintest/cli/convert/wrapper.pyto improve test coverage.Related issue