From d62b418b27b49b30435084544468b91be4128ebe Mon Sep 17 00:00:00 2001 From: brentru Date: Wed, 17 Mar 2021 11:55:00 -0400 Subject: [PATCH] date --- tests/test_datetime.py | 7 +++++-- tests/test_time.py | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_datetime.py b/tests/test_datetime.py index f3ac3c0..02b3e0c 100644 --- a/tests/test_datetime.py +++ b/tests/test_datetime.py @@ -9,8 +9,9 @@ # SPDX-License-Identifier: Python-2.0 # Implements a subset of https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py # NOTE: This test is based off CPython and therefore linting is disabled within this file. -# pylint:disable = invalid-name, no-member, cell-var-from-loop, unused-argument, no-self-use, too-few-public-methods, raise-missing-from, too-many-statements +# pylint:disable = invalid-name, no-member, cell-var-from-loop, unused-argument, no-self-use, too-few-public-methods, raise-missing-from, too-many-statements, too-many-lines, undefined-variable, eval-used, import-outside-toplevel, redefined-outer-name, too-many-locals import sys + # CircuitPython subset implementation sys.path.append("..") from adafruit_datetime import datetime as cpy_datetime @@ -283,7 +284,9 @@ class TestDateTime(TestDate): # So test a case where that difference doesn't matter. t = self.theclass(2002, 3, 22, 18, 3, 5, 123) - self.assertEqual(t.ctime(), cpython_time.ctime(cpython_time.mktime(t.timetuple()))) + self.assertEqual( + t.ctime(), cpython_time.ctime(cpython_time.mktime(t.timetuple())) + ) def test_tz_independent_comparing(self): dt1 = self.theclass(2002, 3, 1, 9, 0, 0) diff --git a/tests/test_time.py b/tests/test_time.py index 04f9bc8..51595ef 100644 --- a/tests/test_time.py +++ b/tests/test_time.py @@ -12,8 +12,10 @@ # pylint:disable = invalid-name, no-member, cell-var-from-loop, unused-argument, no-self-use, too-few-public-methods, consider-using-enumerate, undefined-variable # CircuitPython subset implementation import sys + sys.path.append("..") from adafruit_datetime import time as cpy_time + # CPython standard implementation from datetime import time as cpython_time import unittest