From f26c8c8f4b64f2a6752d7e9f75bce52c67b576e8 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Wed, 25 Sep 2024 14:48:49 +0100 Subject: [PATCH] gh-265: calculate `fixture` once per testing `session` (#266) Follows up https://github.com/glass-dev/glass/pull/241. See explanation of what the `scope` parameter does for `pytest.fixture`. Seems silly to not use it (although in this case the speed-up will be minimal). --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6f6328b6..c9b96801 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,7 @@ import pytest -@pytest.fixture +@pytest.fixture(scope="session") def rng(): import numpy as np