Bug 1754025 [wpt PR 32729] - WebKit export of https://bugs.webkit.org/show_bug.cgi...
[gecko.git] / tools / tryselect / test / test_scriptworker.py
blob3954cb11ea90d962ff94c6dc2140e7235c4b3c42
1 # Any copyright is dedicated to the Public Domain.
2 # https://creativecommons.org/publicdomain/zero/1.0/
4 import re
5 from textwrap import dedent
7 import mozunit
10 def test_release(run_mach, capfd):
11 cmd = [
12 "try",
13 "scriptworker",
14 "--no-push",
15 "tree",
17 assert run_mach(cmd) == 0
19 output = capfd.readouterr().out
20 print(output)
22 expected = re.compile(
23 dedent(
24 r"""
25 Pushed via `mach try scriptworker`
26 Calculated try_task_config.json:
28 "parameters": {
29 "app_version": "\d+\.\d+",
30 "build_number": 1,
31 """
32 ).lstrip(),
33 re.MULTILINE,
35 assert expected.search(output)
38 if __name__ == "__main__":
39 mozunit.main()