summaryrefslogtreecommitdiffstats
path: root/test (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add driver implementation for Ascensia ContourUSB.Arvanitis Christos2019-09-251-0/+117
| | | | | | | | | | | Implemented based on the protocol documentation provide by Ascensia, with portions from glucodump by @sm6xmm (relicensed by the author under MIT license.) Squashed from pull request #62. Signed-off-by: Anders Hammarquist <iko@iko.pp.se> Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.com>
* Add fsoptium basic tests for clock parsing.Diego Elio Pettenò2019-09-021-0/+39
|
* td4277: new driver for rebranded TaiDoc TD-4277 glucometers.Diego Elio Pettenò2019-08-031-0/+31
| | | | | This driver supports the GlucoRx Nexus, Menarini GlucoMen Nexus, and Aktivmed GlucoCheck XL.
* freestyle support: restore correct order of parameters.Diego Elio Pettenò2019-05-161-0/+23
| | | | Also add a test so that we don't break this again in the future.
* Replace epydoc metadata with SPDX identifiers.Diego Elio Pettenò2019-02-086-30/+12
| | | | | | | | | | 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-086-6/+6
| | | | | | | | 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-166-41/+26
| | | | | | | | | | * 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.
* construct: the construct API is significantly unstable, fix to 2.8.22 only.Diego Elio Pettenò2018-02-111-1/+1
| | | | | This still is required to fix Issue #38, but luckily it's just a test failure for now.
* tests: improve code quality by passing the linter.Diego Elio Pettenò2018-01-013-6/+7
|
* test_lifescan: rename from test_otultraeasy, and cleanup.Diego Elio Pettenò2018-01-011-12/+1
| | | | | This test was actually only testing the CRC CCITT implementation now that otultraeasy uses construct.
* otultraeasy: factor out the construct Timestamp implementation.Diego Elio Pettenò2018-01-011-0/+75
| | | | | | | This adds tests to ensure this works right in the general case, so that it can be used with different parameters. The adapter will be reused in the otverio2015 driver.
* 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.
* Add more tests to cover the basic translation of objects to strings.Diego Elio Pettenò2017-12-291-0/+74
| | | | | This would have found an extra bug that was pushed unfixed after enum conversion, and two bugs that I did find during the conversion.
* test: use byte constants instead of encoding on the fly.Diego Elio Pettenò2017-12-281-2/+2
|
* tests: fix OneTouch tests to use Python's own mock, and leverage absl-py.Diego Elio Pettenò2017-12-282-53/+26
| | | | | | 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.
* test_common: use absl-py to increase coverage, and simplify.Diego Elio Pettenò2017-12-281-8/+23
| | | | This ensures the tests run independently instead of failing at the first mistake.
* accucheck_reports: fix bug for mg/dL native meters.Diego Elio Pettenò2017-12-281-10/+2
| | | | | This was mixing up the units in the conversion. While fixing the bug, remove the confusing two-parameter form of convert_glucose_unit.
* Use Python3 Enum class for glucose units.Diego Elio Pettenò2017-12-281-7/+7
| | | | This makes the code more idiomatic and less brittle.
* LifeScan devices: move lifescan_common to the support directory.Diego Elio Pettenò2017-01-162-7/+7
| | | | | 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-022-2/+2
| | | | | 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.
* otultra2: move checksum function within otultra2 driver.Diego Elio Pettenò2014-01-292-28/+8
| | | | | The function is not shared with the Ultra Easy and likely not with other devices either.
* 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.
* Fix style for tests.Diego Elio Pettenò2013-09-293-68/+60
|
* test_otultra2: factor out setting of returned serial string.Diego Elio Pettenò2013-08-101-9/+9
|
* Relicense everything under MIT license.Diego Elio Pettenò2013-08-033-3/+3
| | | | | There is no reason for me to use GPLv3 now that I'm not using the CRC32-Sick code, so I'll go with the most liberal license out there.
* Implement the correct checksum algorithm.Diego Elio Pettenò2013-08-032-4/+5
| | | | | | | Unlike what I though, OneTouch2 does not use CRC32 Sick algorithm, but a very stupid full 16-bit modulo sum of the bytes in the reply. This is very simple and does not require GPLv3 code at all.
* Add support for checksum verification for the otultra2 driver.Diego Elio Pettenò2013-08-032-4/+48
| | | | | | | This introduced some changes in the Exception class to simplify the code, and at the same time it adds a module for multiple lifescan drivers to share code (multiple OneTouch protocols share the same checksum for instance).
* Update function names to follow PEP8.Diego Elio Pettenò2013-08-032-12/+12
|
* Add utf-8 encoding specification to all files.Diego Elio Pettenò2013-08-032-0/+2
|
* Add tests for the glucose unit conversion.Diego Elio Pettenò2013-08-031-0/+53
|
* test_otultra2: add header.Diego Elio Pettenò2013-08-031-0/+7
|
* Initial import of the raw data.Diego Elio Pettenò2013-08-031-0/+48