Repository navigation
Use sqlite-diffable as a Python module - #10
PeskyPotato wants to merge 3 commits into
Conversation
|
If all looks good, I wouldn't mind also updating the README to show some example usage instructions. |
HRtech-lab
left a comment
There was a problem hiding this comment.
The new Python wrapper loses the cause of a missing input file. In an empty directory, sqlite_diffable.dump('missing.db', 'out', all=True) returns False and prints You must set all to True or specify a list of tables, even though all=True was supplied. The equivalent CLI call identifies missing.db as the file that does not exist. Creating a database with one table and repeating the Python call returns True.
Could the wrapper preserve the original Click error, for example by reporting e.format_message() if the boolean return is part of the API? A missing-path test would distinguish this case from omitting the table selection.
The pull list of changes are described in Issue #9, the summary can be found below:
Created wrapper functions for
load,dumpandobjectusing click and sample code from this StackOverflow post.Added tests for dumping one and two tables, and loading two tables.