[Python-checkins] [3.8] bpo-38270: Fix indentation of test_hmac assertions (GH-17446) (GH-17450)

Miss Islington (bot) webhook-mailer at python.org
Thu Dec 5 11:51:38 EST 2019


https://github.com/python/cpython/commit/cfdaf92221da3c264d0da9c588994fefe4073196
commit: cfdaf92221da3c264d0da9c588994fefe4073196
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-12-05T08:51:30-08:00
summary:

[3.8] bpo-38270: Fix indentation of test_hmac assertions (GH-17446) (GH-17450)



Since https://github.com/python/cpython/commit/c64a1a61e6fc542cada40eb069a239317e1af36e two assertions were indented and thus ignored when running test_hmac.

This PR fixes it. As the change is quite trivial I didn't add a NEWS entry.


https://bugs.python.org/issue38270
(cherry picked from commit 894331838b256412c95d54051ec46a1cb96f52e7)


Co-authored-by: stratakis <cstratak at redhat.com>


https://bugs.python.org/issue38270



Automerge-Triggered-By: @tiran

files:
M Lib/test/test_hmac.py

diff --git a/Lib/test/test_hmac.py b/Lib/test/test_hmac.py
index ea00367c8027a..23c108f6e3c27 100644
--- a/Lib/test/test_hmac.py
+++ b/Lib/test/test_hmac.py
@@ -367,7 +367,7 @@ def test_with_bytearray(self):
                           digestmod="sha256")
         except Exception:
             self.fail("Constructor call with bytearray arguments raised exception.")
-            self.assertEqual(h.hexdigest(), self.expected)
+        self.assertEqual(h.hexdigest(), self.expected)
 
     @requires_hashdigest('sha256')
     def test_with_memoryview_msg(self):
@@ -375,7 +375,7 @@ def test_with_memoryview_msg(self):
             h = hmac.HMAC(b"key", memoryview(b"hash this!"), digestmod="sha256")
         except Exception:
             self.fail("Constructor call with memoryview msg raised exception.")
-            self.assertEqual(h.hexdigest(), self.expected)
+        self.assertEqual(h.hexdigest(), self.expected)
 
     @requires_hashdigest('sha256')
     def test_withmodule(self):



More information about the Python-checkins mailing list