summaryrefslogtreecommitdiff
path: root/taskflow/tests/utils.py
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2022-05-17 22:56:45 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2022-05-18 16:12:37 +0900
commit44f17d005ff53008144ca7c509bcb1307d66b23f (patch)
treeb03024443b92a78f3cdacfca29f4010d24c8b685 /taskflow/tests/utils.py
parentb5b69e8110da44a88b2260cd24ada3439f29938e (diff)
downloadtaskflow-44f17d005ff53008144ca7c509bcb1307d66b23f.tar.gz
Remove six
This library no longer supports Python 2, thus usage of six can be removed. This also removes workaround about pickle library used in Python 2 only. Change-Id: I19d298cf0f402d65f0b142dea0bf35cf992332a9
Diffstat (limited to 'taskflow/tests/utils.py')
-rw-r--r--taskflow/tests/utils.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/taskflow/tests/utils.py b/taskflow/tests/utils.py
index 58cd9ab..6c2f13a 100644
--- a/taskflow/tests/utils.py
+++ b/taskflow/tests/utils.py
@@ -21,7 +21,6 @@ import time
from oslo_utils import timeutils
import redis
-import six
from taskflow import exceptions
from taskflow.listeners import capturing
@@ -137,7 +136,7 @@ class GiveBackRevert(task.Task):
result = kwargs.get('result')
# If this somehow fails, timeout, or other don't send back a
# valid result...
- if isinstance(result, six.integer_types):
+ if isinstance(result, int):
return result + 1
@@ -153,12 +152,8 @@ class LongArgNameTask(task.Task):
return long_arg_name
-if six.PY3:
- RUNTIME_ERROR_CLASSES = ['RuntimeError', 'Exception',
- 'BaseException', 'object']
-else:
- RUNTIME_ERROR_CLASSES = ['RuntimeError', 'StandardError', 'Exception',
- 'BaseException', 'object']
+RUNTIME_ERROR_CLASSES = ['RuntimeError', 'Exception', 'BaseException',
+ 'object']
class ProvidesRequiresTask(task.Task):
@@ -410,11 +405,11 @@ class WaitForOneFromTask(ProgressingTask):
def __init__(self, name, wait_for, wait_states, **kwargs):
super(WaitForOneFromTask, self).__init__(name, **kwargs)
- if isinstance(wait_for, six.string_types):
+ if isinstance(wait_for, str):
self.wait_for = [wait_for]
else:
self.wait_for = wait_for
- if isinstance(wait_states, six.string_types):
+ if isinstance(wait_states, str):
self.wait_states = [wait_states]
else:
self.wait_states = wait_states