summaryrefslogtreecommitdiff
path: root/taskflow/tests/unit/test_utils_iter_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix test_while_is_not with python 3.115.1.0Gregory Thiemonge2022-12-051-11/+18
| | | | | | | | | | | | | | The test_while_is_not function relied on strings and literals to test the 'while_is_not' function. But the while_is_not function uses the 'is' operator to test the equivalency of 2 objects. This triggers a bug with python 3.11 where using 'is' with literals is not advised (it is not recommended since python 3.8 [0]). The test now uses objects from a specific class to evaluate the while_is_not function. [0] https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior Change-Id: I38a0135aaf73e25aa20a11c0685d5c2a7b587a07
* Remove sixTakashi Kajinami2022-05-181-21/+18
| | | | | | | | 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
* Fix wrong usage of iter_utils.unique_seenJoshua Harlow2016-01-091-2/+18
| | | | | | | | | | This wasn't actually using the right data to derive uniqueness, so fix it to actually use the right entry to determine what to skip or what not to skip. Closes-Bug: #1525379 Change-Id: Ic23b6d03877f7714f6a3fb74adac0ba58cd97f0d
* Add ability of job poster/job iterator to wait for jobs to completeJoshua Harlow2015-12-161-0/+27
| | | | | | | | It is quite useful for someone who has posted a job to be able to easily wait for its completion (up to a given timeout) so add a wait method onto the job class to allow for this to be possible. Change-Id: Id3a7c724020962591e323da0febfd0c71d1acc50
* Move 'fill_iter' to 'iter_utils.fill'Joshua Harlow2015-10-261-0/+51
| | | | | | | | | | | | | | This is better placed in the iterator utility module as it acts on iterables and provides its own iterator that fills up to (and potentially beyond) a provided iterator. Also adds some nice tests to make sure it keeps on working as expected; as well as tests for other parts of iter_utils to ensure they keep on working as expected as well. Change-Id: Ica90816cbdedfd87f3861a111d7a852655c1fb74
* Replace the tree 'pformat()' recursion with non-recursive variantJoshua Harlow2015-07-271-0/+62
This adjusted variant creates the same output but is hopefully easier to understand and follow than the recursive version. This version is also not limited by the python stack limit which is a general good thing to avoid being limited by. It also adds a bunch of tests to make sure the format is as expected under various tree structures. Change-Id: I2ae42c7c1bf72794800929250bcf6ccbe658230b