Skip to content

Comments

Unit tests + source code restructure#7

Open
ShadenSmith wants to merge 10 commits intodionysio:masterfrom
ShadenSmith:test_refactor
Open

Unit tests + source code restructure#7
ShadenSmith wants to merge 10 commits intodionysio:masterfrom
ShadenSmith:test_refactor

Conversation

@ShadenSmith
Copy link
Contributor

This PR adds unit tests via Python's unittest framework. It accordingly moves the bulk of the sorting code to csvsorter.py and simply calls that function from the __init__.py entrypoint.

This also includes a fix for heapq.merge() accepting a key parameter for when a subset of columns are being sorted. Note: the key parameter was added in Python version 3.5, and so this will not work in older distributions.

Note: I have not tested this code as a commandline utility -- maybe setup.py needs to be edited as well? I have only touched it as a library.

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.

1 participant