default_timeout: Reformat tests
Change-Id: I83559c3c15e0b117e71a8ede8577b16a2ecbc172
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/229271
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Danielle Kay <danikay@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/recipe_modules/default_timeout/tests/full.py b/recipe_modules/default_timeout/tests/full.py
index 0ac55c7..ac3d5f8 100644
--- a/recipe_modules/default_timeout/tests/full.py
+++ b/recipe_modules/default_timeout/tests/full.py
@@ -39,47 +39,48 @@
def GenTests(api) -> Generator[recipe_test_api.TestData, None, None]:
"""Create tests."""
- yield (
- api.test('medium')
- + api.checkout.try_test_data(
+ yield api.test(
+ 'medium',
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
execution_timeout=30 * 60,
- )
- + api.time.seed(1600000000)
- + api.time.step(20.0)
- + api.post_process(post_process.MustRun, 'step0')
- + api.post_process(post_process.MustRun, 'step1')
- + api.post_process(post_process.MustRun, 'step2')
- + api.post_process(post_process.MustRun, 'step3')
- + api.post_process(post_process.MustRun, 'step4')
- + api.post_process(post_process.DropExpectation)
+ ),
+ api.time.seed(1600000000),
+ api.time.step(20.0),
+ api.post_process(post_process.MustRun, 'step0'),
+ api.post_process(post_process.MustRun, 'step1'),
+ api.post_process(post_process.MustRun, 'step2'),
+ api.post_process(post_process.MustRun, 'step3'),
+ api.post_process(post_process.MustRun, 'step4'),
+ api.post_process(post_process.DropExpectation),
)
# This doesn't really test anything in this module, except the test-only
# code that ignores this module's logic when the remaining time is negative.
- yield (
- api.test('negative')
- + api.checkout.try_test_data()
- + api.post_process(post_process.MustRun, 'step0')
- + api.post_process(post_process.MustRun, 'step1')
- + api.post_process(post_process.MustRun, 'step2')
- + api.post_process(post_process.MustRun, 'step3')
- + api.post_process(post_process.MustRun, 'step4')
- + api.post_process(post_process.DropExpectation)
+ yield api.test(
+ 'negative',
+ api.checkout.try_test_data(),
+ api.post_process(post_process.MustRun, 'step0'),
+ api.post_process(post_process.MustRun, 'step1'),
+ api.post_process(post_process.MustRun, 'step2'),
+ api.post_process(post_process.MustRun, 'step3'),
+ api.post_process(post_process.MustRun, 'step4'),
+ api.post_process(post_process.DropExpectation),
)
- yield (
- api.test('timed-out', status='FAILURE')
- + api.checkout.try_test_data(
+ yield api.test(
+ 'timed-out',
+ api.checkout.try_test_data(
start_time=datetime.datetime.utcfromtimestamp(1600000000),
execution_timeout=15,
- )
- + api.time.seed(1600000000)
- + api.time.step(1.0)
- + api.post_process(post_process.MustRun, 'step0')
- + api.post_process(post_process.MustRun, 'step1')
- + api.post_process(post_process.MustRun, 'step2')
- + api.post_process(post_process.DoesNotRun, 'step3')
- + api.post_process(post_process.DoesNotRun, 'step4')
- + api.post_process(post_process.DropExpectation)
+ ),
+ api.time.seed(1600000000),
+ api.time.step(1.0),
+ api.post_process(post_process.MustRun, 'step0'),
+ api.post_process(post_process.MustRun, 'step1'),
+ api.post_process(post_process.MustRun, 'step2'),
+ api.post_process(post_process.DoesNotRun, 'step3'),
+ api.post_process(post_process.DoesNotRun, 'step4'),
+ api.post_process(post_process.DropExpectation),
+ status='FAILURE',
)