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_fsoptium.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 test/test_fsoptium.py (limited to 'test/test_fsoptium.py') diff --git a/test/test_fsoptium.py b/test/test_fsoptium.py deleted file mode 100644 index bdc76f8..0000000 --- a/test/test_fsoptium.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# -# SPDX-License-Identifier: MIT -"""Tests for the FreeStyle Optium driver.""" - -# pylint: disable=protected-access,missing-docstring - -import datetime - -from absl.testing import parameterized -from glucometerutils import exceptions -from glucometerutils.drivers import fsoptium - - -class TestFreeStyleOptium(parameterized.TestCase): - @parameterized.parameters( - ("Clock:\tApr 22 2014\t02:14:37", datetime.datetime(2014, 4, 22, 2, 14, 37)), - ("Clock:\tJul 10 2013\t14:26:44", datetime.datetime(2013, 7, 10, 14, 26, 44)), - ("Clock:\tSep 29 2013\t17:35:34", datetime.datetime(2013, 9, 29, 17, 35, 34)), - ) - def test_parse_clock(self, datestr, datevalue): - self.assertEqual(fsoptium._parse_clock(datestr), datevalue) - - @parameterized.parameters( - ("Apr 22 2014 02:14:37",), - ("Clock:\tXxx 10 2013\t14:26",), - ("Clock:\tSep 29 2013\t17:35:22.34",), - ("Foo",), - ) - def test_parse_clock_invalid(self, datestr): - with self.assertRaises(exceptions.InvalidResponse): - fsoptium._parse_clock(datestr) -- cgit v1.2.3