diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2023-01-31 23:38:49 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2023-02-01 00:00:24 +0100 |
commit | 4c3664e639c84ba8ab67a01e4cfc046ee40fcbff (patch) | |
tree | 8666001dba15e2139526d51f7fae7f154d2cd720 /tests/test_bio.py | |
parent | 6a42ea50f90d4abec45e44798e5d0bfeeb5d33c2 (diff) | |
download | m2crypto-4c3664e639c84ba8ab67a01e4cfc046ee40fcbff.tar.gz |
Remove use of parameterized in favour of unittest.subTest.
Fixes #327.
Diffstat (limited to 'tests/test_bio.py')
-rw-r--r-- | tests/test_bio.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_bio.py b/tests/test_bio.py index d1833fd..50fed66 100644 --- a/tests/test_bio.py +++ b/tests/test_bio.py @@ -10,9 +10,7 @@ Author: Heikki Toivonen """ import logging -from parameterized import parameterized - -from M2Crypto import BIO, Rand +from M2Crypto import BIO, Rand, six from tests import unittest from tests.fips import fips_mode @@ -68,9 +66,11 @@ class CipherStreamTestCase(unittest.TestCase): self.assertEqual(data, data2, '%s algorithm cipher test failed' % algo) - @parameterized.expand(ciphers) - def test_algo(self, algo): - self.try_algo(algo) + @unittest.skipUnless(six.PY34, "Doesn't support subTest") + def test_algo(self): + for algo in ciphers: + with self.subTest(algo=algo): + self.try_algo(algo) def test_nosuchalgo(self): with self.assertRaises(ValueError): |