Closed andri-ch closed 9 years ago
In functional tests file, before issuing a cmd like HelperSave, tests should aquire the lock with: self.client.command('py semaphore.aquire') But that would only work if HelperSave is ran in a thread, right?
Vim delay could be solved with threads that run the Helper* cmds and a Lock/Semaphore object.
I've created a delay(timeout=1) function that sets a var inside editor. The function will be called after a time consuming command was sent to Vim. delay() will return when it manages to read the variable from editor (meaning that editor has completed the previous command) or it raises an exception after timeout seconds.
related to 48 and 44, might fix them. When doing functional tests, and issuing a Helper* command there is a time delay between vim redrawing the screen with new information and the faster python tests that read the screen contents and extract info and make assumptions based on that info. So, in a test, I issue a command and read Vim's screen contents, but the contents might be the result of the previous test.
Sol: