knipknap/SpiffWorkflow — pull request #25 by jplana (2013-05-17 19:25:49+00:00)
Title: Fix ExecuteTask ping test. In some platforms the call won't return the expected task transitions.

I'm getting this when executing the unit test suite:

```
==============================================================
FAIL: testPattern (specs.ExecuteTest.ExecuteTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jplana/Code/SelfServiceHotfixService/SpiffWorkflow/tests/SpiffWorkflow/specs/ExecuteTest.py", line 43, in testPattern
Task.COMPLETED])
AssertionError: Lists differ: [4, 16, 32] != [4, 8, 16, 32]

First differing element 1:
16
8

Second list contains 1 additional elements.
First extra element 3:
32

- [4, 16, 32]
+ [4, 8, 16, 32]
? +++

----------------------------------------------------------------------
```
The problem seems show up only under the osx platform, but not in linux. I'd say that `my_task.subprocess.poll()` (in Execute.py) behaves quite diferently between mac and linux. I found that if we call instead the python interpreter with an arbitrary script (I added one to the test suite), that call actually takes enough time to make the task go through the missing WAITING state.

I know that this is a very basic patch, but it's a solution for the actually failing test suite.