aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-05-18Parse files with new non-exception functionsFrederick Muriuki Muriithi
Parse the files with the new functions that return error objects instead of raising exceptions
2022-05-18Return errors when found or None otherwiseFrederick Muriuki Muriithi
This commit adds a number of functions that return the error object when an error is found, or `None` otherwise. It avoids the use of exceptions as control flow constructs.
2022-05-02Optimise strain names parsingFrederick Muriuki Muriithi
- Use a way faster way of parsing the strains file
2022-04-25Advance seek_position on errorFrederick Muriuki Muriithi
Advance the seek position, once we have yielded up an error to causing an infinite loop in certain conditions, where the `parse_errors` function ends up resuming the gile in the same position once it experiences an error.
2022-04-25`take`: function to select a few items from an iterableFrederick Muriuki Muriithi
To avoid processing all the items in an iterable, the `take` function is added in this commit. It realised a limited number (specified at call time) of items from the iterable given.
2022-04-21Collect all the errorsFrederick Muriuki Muriithi
Build a function to collect all the parsing errors into a "sequence" of dict objects containing the issues found.
2022-04-20Update parameters for testsFrederick Muriuki Muriithi
Derive a "correct" sample file from an existing sample file with errors for testing with large files. Fix issue caught by test.
2022-04-20Fix linting issuesFrederick Muriuki Muriithi
2022-04-13Implement remaining file parsing testsFrederick Muriuki Muriithi
* Implement remaining file parsing tests and some helpers functions needed for ensuring the tests work.
2022-04-13Add test for duplicate headersFrederick Muriuki Muriithi
2022-04-13Implement test for parsing that failsFrederick Muriuki Muriithi
* Improve tests that ensure parsing fails in case the file has errors * Add strains.csv file * Implement minimum viable functionality that passes the implemented tests
2022-04-13Add tests outline for file parsingFrederick Muriuki Muriithi
Add dummy failing tests and a stub for the parsing of the files
2022-04-13Update Exception nameFrederick Muriuki Muriithi
Change the exception name to be more descriptive.
2022-04-13Add sample files for testsFrederick Muriuki Muriithi
Add some sample files to be used for testing that the parsing works as expected.
2022-04-11Add missing `__init__.py` to prevent import errorsFrederick Muriuki Muriithi
Without the `tests/__init__.py` file, the tests directory was not considered a package and therefore, running: $ pytest would fail with import error notifications. This fixes that.
2022-04-11Add tests for headersFrederick Muriuki Muriithi
* Add tests to check for validity of the headers * Add stubs for the tests
2022-04-11Implement tests and stubs for functions under testFrederick Muriuki Muriithi
2022-04-11Set up initial, failing tests for cell valuesFrederick Muriuki Muriithi