From f5143327b243fc616f37252d76bd31f2690b088d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Mon, 16 Mar 2020 18:51:27 +0000 Subject: Move tests to be organized within the source directory. This should simplify maintaining the tests in the long run, and allows mypy to more thoroughly check for types. --- test/test_td4277.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 test/test_td4277.py (limited to 'test/test_td4277.py') diff --git a/test/test_td4277.py b/test/test_td4277.py deleted file mode 100644 index fbd4aa2..0000000 --- a/test/test_td4277.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# -# SPDX-License-Identifier: MIT -"""Tests for the TD-4277 driver.""" - -# pylint: disable=protected-access,missing-docstring - -import datetime - -from absl.testing import parameterized -from glucometerutils import exceptions -from glucometerutils.drivers import td4277 -from glucometerutils.support import lifescan - - -class TestTD4277Nexus(parameterized.TestCase): - @parameterized.parameters( - (b"\x21\x24\x0e\x15", datetime.datetime(2018, 1, 1, 21, 14)), - (b"\x21\x26\x0e\x15", datetime.datetime(2019, 1, 1, 21, 14)), - (b"\x04\x27\x25\x0d", datetime.datetime(2019, 8, 4, 13, 37)), - ) - def test_parse_datetime(self, message, date): - self.assertEqual(td4277._parse_datetime(message), date) - - def test_making_message(self): - self.assertEqual( - td4277._make_packet(0x22, 0), b"\x51\x22\x00\x00\x00\x00\xa3\x16" - ) -- cgit v1.2.3