aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-10-18 20:36:00 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-10-18 20:36:00 +0300
commit76ae97ff1434941dcf0c6bf1679146dcb28718aa (patch)
treec1f528d1aa2628024821386d878a1e32aba012e6 /test
parentworkflows/ci: use ubuntu-latest (diff)
downloadaes-tools-76ae97ff1434941dcf0c6bf1679146dcb28718aa.tar.gz
aes-tools-76ae97ff1434941dcf0c6bf1679146dcb28718aa.zip
test: fix Python 3.10 incompatibilities
Diffstat (limited to 'test')
-rw-r--r--test/toolkit.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/toolkit.py b/test/toolkit.py
index 103dc9d..650e81e 100644
--- a/test/toolkit.py
+++ b/test/toolkit.py
@@ -3,7 +3,7 @@
# For details, see https://github.com/egor-tensin/aes-tools.
# Distributed under the MIT License.
-import collections
+from collections.abc import Iterable
from enum import Enum
import logging
import os.path
@@ -71,7 +71,7 @@ class Tools:
if search_dirs:
if isinstance(search_dirs, str):
os.environ['PATH'] += os.pathsep + search_dirs
- elif isinstance(search_dirs, collections.Iterable):
+ elif isinstance(search_dirs, Iterable):
os.environ['PATH'] += os.pathsep + os.pathsep.join(search_dirs)
else:
os.environ['PATH'] += os.pathsep + str(search_dirs)
@@ -119,7 +119,7 @@ class Tools:
@staticmethod
def _build_block_args(algorithm, mode, inputs, use_boxes=False):
args = Tools._block_settings_to_args(algorithm, mode, use_boxes)
- if isinstance(inputs, collections.Iterable):
+ if isinstance(inputs, Iterable):
args.extend(Tools._block_inputs_to_args(iter(inputs)))
else:
args.extend(inputs.to_args())