Adds a prereleases magic argument and update_settings option to enable prerelease updates
Created by: idpaterson
This pull request adds a prereleases
magic argument and optional override in the update_settings
dict which will allow users of a workflow to subscribe to a pre-release update channel. Tests are rewritten for py.test and changes are rebased on develop.
See #73 for discussion.
I am not confident on the tests for the workflow:update command and so left them in a separate commit for now. I ended up initializing the contexts with clear=False
because the second test tried to run __workflow_update_check
in the background which caused assert c.cmd == ()
to fail. I think that this is still a valid way to test since the update
magic arg avoids the update info cache and does a clean update.check_update
.
Whereas test_update
asserts wf.update_available is False
after creating that initial context, wf.update_available
was True
in the test_update_with_prereleases
. Is the purpose of that initial run to get the background update check out of the way? I suspect something is leaking between these two tests, especially since assert c.cmd == ()
worked for test_update
even without clear=False
.
def test_update(httpserver):
with ctx() as (wf, c):
wf.run(fake)
assert wf.update_available is False
[...]
def test_update_with_prereleases(httpserver):
with ctx() as (wf, c):
wf.run(fake)
# wf.update_available is actually True here
[...]