You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial_fixtures.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Each fixture is associated with a scope.
30
30
This practically indicates at which level a fixture is shared with other tests.
31
31
There are four fixture scopes, which are listed below in decreasing order of generality:
32
32
33
-
- ``session``: A fixture with this scope will be executed once per a ReFrame run session and will be shared across the whole run.
33
+
- ``session``: A fixture with this scope will be executed once per ReFrame run session and will be shared across the whole run.
34
34
- ``partition``: A fixture with this scope will be executed once per partition and will be shared across all tests that run in that partition.
35
35
- ``environment``: A fixture with this scope will be executed once per partition and environment combination and will be shared across all tests that run with this partition and environment combination.
36
36
- ``test``: A fixture with this scope is private to the test and will be executed for each test case.
@@ -57,7 +57,7 @@ Let's inspect now the :class:`build_osu_benchmarks` fixture:
57
57
It is obvious that it is a normal ReFrame test except that it does not need to be decorated with the :func:`@simple_test <reframe.core.decorators.simple_test>` decorator.
58
58
This means that the test will only be executed if it is a fixture of another test.
59
59
If it was decorated, it would be executed both as a standalone test and as a fixture of another test.
60
-
Another detail is that this test does dot define the :attr:`~reframe.core.pipeline.RegressionTest.valid_systems` and :attr:`~reframe.core.pipeline.RegressionTest.valid_prog_environs` variables.
60
+
Another detail is that this test does not define the :attr:`~reframe.core.pipeline.RegressionTest.valid_systems` and :attr:`~reframe.core.pipeline.RegressionTest.valid_prog_environs` variables.
61
61
Fixtures inherit those variables from the test that owns them depending on the scope.
62
62
63
63
Similarly to :class:`OSUBenchmarkTestBase`, this test uses a fixture that fetches the OSU benchmarks sources.
@@ -78,7 +78,7 @@ Let's inspect the last fixture, the :class:`fetch_osu_benchmarks`:
78
78
79
79
There is nothing special to this test -- it is just an ordinary test -- except that we force it to execute locally by setting its :attr:`~reframe.core.pipeline.RegressionTest.local` variable.
80
80
The reason for that is that a fixture at session scope can execute with any partition/environment combination, so ReFrame could have to spawn a job in case it has chosen a remote partition to launch this fixture on.
81
-
For this reason, we simply force it execute locally regardless of the chosen partition.
81
+
For this reason, we simply force it to execute locally regardless of the chosen partition.
82
82
83
83
It is now time to run the new tests, but let us first list them:
84
84
@@ -126,7 +126,7 @@ The following figure shows the generated fixtures as well as their conceptual de
126
126
127
127
:sub:`Expanded fixtures and dependencies for the OSU benchmarks example.`
128
128
129
-
Notice how the :class:`build_osu_benchmarks` fixture is populated three times, for each partition and environment combination, and the :class:`fetch_osu_benchmarks` is generated only once.
129
+
Notice how the :class:`build_osu_benchmarks` fixture is populated three times, once for each partition and environment combination, and the :class:`fetch_osu_benchmarks` is generated only once.
130
130
Tests in a single ReFrame session must have unique names, so the fixture class name is mangled by the framework to generate a unique name in the test dependency DAG.
131
131
A *scope* part is added to the base name of the fixture, which in this figure is indicated with red color.
0 commit comments