diff options
| author | Ivan A. Melnikov <imelnikov@griddynamics.com> | 2014-03-22 19:48:50 +0400 |
|---|---|---|
| committer | Ivan A. Melnikov <imelnikov@griddynamics.com> | 2014-03-22 19:48:50 +0400 |
| commit | 94bda8734e2fd08424198433e0f17586b2ccded7 (patch) | |
| tree | 41629fdb05161b7c7468f6bdaccffe3e09de0c78 /taskflow/tests/utils.py | |
| parent | 563bede00613f4e8d4305a6001ab20227d6bc0d9 (diff) | |
| download | taskflow-94bda8734e2fd08424198433e0f17586b2ccded7.tar.gz | |
tests: Fix WaitForOneFromTask constructor parameter introspection
Strings are iterable, so the check in WaitForOneFromTask was
effectively useless. This lead to TypeErrors (caught by transition
notifier) when it tried to find None in 'task1'.
Change-Id: I3e91029f7b7cb960d6ca84490de76b5e044bc238
Diffstat (limited to 'taskflow/tests/utils.py')
| -rw-r--r-- | taskflow/tests/utils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/taskflow/tests/utils.py b/taskflow/tests/utils.py index 6c4d6ae..8fcf935 100644 --- a/taskflow/tests/utils.py +++ b/taskflow/tests/utils.py @@ -15,10 +15,9 @@ # under the License. import contextlib +import threading -import collections import six -import threading from taskflow import exceptions from taskflow.persistence.backends import impl_memory @@ -317,11 +316,11 @@ class WaitForOneFromTask(SaveOrderTask): def __init__(self, name, wait_for, wait_states, **kwargs): super(WaitForOneFromTask, self).__init__(name, **kwargs) - if not isinstance(wait_for, collections.Iterable): + if isinstance(wait_for, six.string_types): self.wait_for = [wait_for] else: self.wait_for = wait_for - if not isinstance(wait_states, collections.Iterable): + if isinstance(wait_states, six.string_types): self.wait_states = [wait_states] else: self.wait_states = wait_states |
