Skip to content

Commit 86a1bca

Browse files
committed
refactor: remove testing of stdlib code
This removes a bunch of test calls against compare_digest which is imported from the standard library, and not exposed to users of this library. Mypy also did not like this.
1 parent 0a964ba commit 86a1bca

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ def test_verify(self):
331331
self.assertFalse(steam.verify("4MK54"))
332332

333333

334-
class CompareDigestTest(unittest.TestCase):
335-
method = staticmethod(pyotp.utils.compare_digest)
334+
class StringComparisonTest(unittest.TestCase):
335+
method = staticmethod(pyotp.utils.strings_equal)
336336

337337
def test_comparisons(self):
338338
self.assertTrue(self.method("", ""))
@@ -343,10 +343,6 @@ def test_comparisons(self):
343343
self.assertFalse(self.method("a", ""))
344344
self.assertFalse(self.method("a" * 999 + "b", "a" * 1000))
345345

346-
347-
class StringComparisonTest(CompareDigestTest):
348-
method = staticmethod(pyotp.utils.strings_equal)
349-
350346
def test_fullwidth_input(self):
351347
self.assertTrue(self.method("xs12345", "xs12345"))
352348

0 commit comments

Comments
 (0)