From 17aecdaed968c6702c88065a63aac4acaa236cd3 Mon Sep 17 00:00:00 2001 From: Arash Bakhtiari Date: Fri, 23 Sep 2022 22:05:19 -0700 Subject: [PATCH] Add missing pytest fixture scope Set the `score` of the pytest fixture to make sure the fixture executes only once, and hence fixes the slow tests runs. --- tests/unit/ops/transformer/inference/test_residual_add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/ops/transformer/inference/test_residual_add.py b/tests/unit/ops/transformer/inference/test_residual_add.py index 6f34437fa3aa..2cc5a8eb49cb 100644 --- a/tests/unit/ops/transformer/inference/test_residual_add.py +++ b/tests/unit/ops/transformer/inference/test_residual_add.py @@ -18,7 +18,7 @@ def allclose(x, y): return torch.allclose(x, y, rtol=rtol, atol=atol) -@pytest.fixture +@pytest.fixture(scope="module") def inference_module(): return InferenceBuilder().load()