summaryrefslogtreecommitdiff
path: root/taskflow/tests/unit/patterns
Commit message (Collapse)AuthorAgeFilesLines
* Quote string representationsMichael Johnson2022-06-103-6/+6
| | | | | | | | networkx 2.8.3 will raise errors if certain characters, such as a colon, in the node names and the string is not quoted. This patch double quotes flow, node, and task string representations to make sure there are not issues with these characters occuring in the names. Story: 2010083 Change-Id: Ib0941cddf14dde5d6b9f97fe0224d6e6f3975226
* Switch from unittest2 compat methods to Python 3.x methodsmelissaml2020-07-051-9/+9
| | | | | | | | | | | | | | | | | With the removal of Python 2.x we can remove the unittest2 compat wrappers and switch to assertCountEqual instead of assertItemsEqual We have been able to use them since then, because testtools required unittest2, which still included it. With testtools removing Python 2.7 support [3][4], we will lose support for assertItemsEqual, so we should switch to use assertCountEqual. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277 Change-Id: Iaa8251a1e9965a00fe99b7a740a104c011260340
* Replace assertRaisesRegexp with assertRaisesRegexVu Cong Tuan2017-06-031-6/+6
| | | | | | | | | | assertRaisesRegexp was renamed to assertRaisesRegex in Py3.2 For more details, please check: https://docs.python.org/3/library/ unittest.html#unittest.TestCase.assertRaisesRegex Change-Id: I89cce19e80b04074aab9f49a76c7652acace78b3 Closes-Bug: #1436957
* Allow for alterations in decider 'area of influence'Joshua Harlow2016-01-091-0/+10
| | | | | | | | Christmas came early. Closes-Bug: #1479466 Change-Id: I931d826690c925f022dbfffe9afb7bf41345b1d0
* For taskflow patterns don't show taskflow.patterns prefixJoshua Harlow2016-01-053-12/+39
| | | | | | | | | Showing the full name in flow __str__() isn't expecially helpful and clutters up graphviz usage and similar so if a taskflow built-in pattern is stringified just use the short name (that does not start with taskflow.patterns instead of the full long name). Change-Id: Icd8c26eab1e19d6ecf9c4e8e82e6d6902ce5b6ea
* Fix order of assertEqual for unit.patternslin-hua-cheng2015-10-173-94/+88
| | | | | | | First parameter should be the expected value. Change-Id: I06140e4be87663136483d1e7be3bc471fbbbf92b Partial-Bug: #1357117
* Use graphs as the underlying structure of patternsJoshua Harlow2015-09-181-1/+1
| | | | | | | | | This unifies all the patterns to be graph based so that they are more uniform and there underlying constraints are more easy to understand (taskflow basically processes graphs). Change-Id: Ib2ab07c1c87165cf40a06508128010887f658391
* iter_nodes method added to flowsTimofey Durakov2015-08-283-0/+64
| | | | | | | New method allows to iterate over flow node and get access to node metadata during iteration. Change-Id: Ib0fc77f0597961602fbc3b49ba09e4df815d8230
* Use 'node' terminology instead of 'item' terminologyJoshua Harlow2015-03-301-3/+3
| | | | | | | | | Since graphs are composed of 'nodes' it seems more appropriate to use that terminology (which is known to people with graph experience) instead of the non descriptive and/or standard 'item' terminology. Change-Id: I04a4521386d3cdf7e58fb9fa8cf26c00443c2cf6
* Update Flow::__str__Manish Godara2015-02-173-4/+4
| | | | | | | The current implementation seems a little cryptic so updating it to clearly indicate the atom count. Change-Id: I4f97e458a4b80e33b3d6348a3ef632398586ed47
* Relax the graph flow symbol constraintsJoshua Harlow2014-09-081-1/+34
| | | | | | | | | | In order to make it possible to have a symbol tree we need to relax the constraints that are being imposed by the graph flow. Part of blueprint taskflow-improved-scoping Change-Id: I2e14de2131c3ba4e3e4eb3108477583d0f02dae2
* Relax the unordered flow symbol constraintsJoshua Harlow2014-09-081-20/+22
| | | | | | | | | | | | In order to make it possible to have a symbol tree we need to relax and remove the constraints that are being imposed by the unordered constraints and later move those constraint checks and validations into the engines compilation stage. Part of blueprint taskflow-improved-scoping Change-Id: I80718b4bc01fbf0dce6a95cd2fac7e6e2e1814d1
* Relax the linear flow symbol constraintsJoshua Harlow2014-09-081-19/+0
| | | | | | | | | | | | In order to make it possible to have a symbol tree we need to relax and remove the constraints that are being imposed by the linear constraints and later move those constraint checks and validations into the engines compilation stage. Part of blueprint taskflow-improved-scoping Change-Id: I6efdc821ff991e83572d89f56be5c678d007f9f8
* Enabled hacking checks H305 and H307Christian Berendt2014-07-173-3/+0
| | | | | | | * H305 imports not grouped correctly * H307 like imports should be grouped together Change-Id: If1dd9c89f65ede6959865a885777cb08c263eca0
* Adjust the exception hierachyJoshua Harlow2014-03-242-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Group the exceptions into the following groups * Storage * Jobs * Execution * Other (wrapped failure here) This grouping makes it easier to understand where one type of exception should be used vs using another type of exception. Backwards incompatible changes: * StorageError -> StorageFailure * AlreadyExists -> Duplicate * WrappedFailure now inherits from Exception and not directly from TaskFlowException since it wraps arbitrary other exceptions and is not specific to taskflow. Cleanups: * JobNotFound -> NotFound * EmptyFlow -> Empty * JobAlreadyExists -> AlreadyExists * InvariantViolation (X) * ConnectionFailure (X) Change-Id: I0e1e81b513fbbc7adb8bfaa1244993e345ab70d3
* Rework graph flow unit testsIvan A. Melnikov2014-03-221-0/+259
| | | | | | | | This commit adds unit tests that check graph flow methods without executing or flattening it. Now-redundant tests from other test suites are deleted. Change-Id: I8dafe0f9b295428831eddb3f9fd48f042d2f1ffc
* Unit tests for unordered flowIvan A. Melnikov2014-03-211-0/+109
| | | | | | | This change adds unit tests that check unordered flow methods without loading it into engine and executing it. Change-Id: I665b6fe070759061edf7a7da4f117c0269c9c3cf
* Linear flow: mark links and rework unit testsIvan A. Melnikov2014-03-212-0/+140
- add 'invariant': True to all links produced by linear flow; - write new unit tests for basic functionality of linear flow pattern; - remove some simple now-redundant unit tests from test_flow_dependencies. Change-Id: I1f4fa8a1dfc61485555a10e8d0629a67aab1997f