summaryrefslogtreecommitdiffstats
path: root/test/test_otultraeasy.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move tests to be organized within the source directory.Diego Elio Pettenò2020-03-161-23/+0
| | | | | This should simplify maintaining the tests in the long run, and allows mypy to more thoroughly check for types.
* format code with blackBen2020-03-081-7/+6
|
* Replace epydoc metadata with SPDX identifiers.Diego Elio Pettenò2019-02-081-5/+2
| | | | | | | | | | Most of the epydoc metadata (author, copyright, email) is duplicate in the package's setup.py or README. These copies are more likely to get out of date, and increase the amount of work to keep them in line. The license information should rather be provided with an SPDX identifier, which is more similar to what the Linux kernel and other projects, such as pyserial, do.
* Replace flameeyes.eu with flameeyes.com.Diego Elio Pettenò2019-02-081-1/+1
| | | | | | | | Due to EURid threatening to suspend my domain, make sure that the references are updated to point at the right stable domain. This includes changes to the files as well as a mailmap to update the author references in the log.
* tests: simplify and cleanup.Diego Elio Pettenò2018-11-161-3/+0
| | | | | | | | | | * Remove the __main__ blocks as the tests should not be executable by themselves. * Use absltest everywhere instead of a mixture of unittest/absltest (via parameterized). * Only modify import path once. * Cleanup pylint warnings, by disabling those that are not useful, and fixing those that are.
* otultraeasy: factor out the packet creation, and add tests.Diego Elio Pettenò2018-11-161-0/+30
| | | | | This would have caught the bug fixed with the previous commit, which is a strict improvement.
* test_lifescan: rename from test_otultraeasy, and cleanup.Diego Elio Pettenò2018-01-011-43/+0
| | | | | This test was actually only testing the CRC CCITT implementation now that otultraeasy uses construct.
* otultraeasy: rewrite using construct for parsing.Diego Elio Pettenò2018-01-011-17/+0
| | | | | | | | | This removes the wholly complicated _Packet() object and replace it with more readable construct. Unfortunately this appears to reduce performance because of the serial stream buffering, needed to calculate the checksum. It's unfortunate, but it at least avoids a significant amount of custom code.
* tests: fix OneTouch tests to use Python's own mock, and leverage absl-py.Diego Elio Pettenò2017-12-281-5/+5
| | | | | | Since I've increased the minimum Python version to 3.4, mock is now available within Python. And since I already used absl-py parameterized for test_common, make use of it to avoid boilerplate.
* LifeScan devices: move lifescan_common to the support directory.Diego Elio Pettenò2017-01-161-3/+3
| | | | | This makes it easier to figure out which files represent drivers, and which ones are per-vendor support modules.
* Move the InvalidChecksum exception to the base exceptions module.Diego Elio Pettenò2016-03-021-1/+1
| | | | | Most glucometers have *some* sort of checksum, so there is no reason to implement this on a per-driver basis.
* otultraeasy: move the crc function to lifescan_common.Diego Elio Pettenò2016-02-131-2/+2
| | | | | The same CRC-CCITT function is used in Verio 2015 devices, so prepare to reuse it by moving it to the common module.
* Initial support for OneTouch Ultra Easy glucometers.Diego Elio Pettenò2014-01-291-0/+60
The driver is fully functional but requires proper documentation and testing.