Skip to content

Commit a400ef9

Browse files
committed
test(TestCompLoad.fixture_dir): specify the scope
Currently, the fixture directory is created for every test because the scope of the fixture is not specified. Since the contents of the fixture directory is fixed and each test does not modify its contents, it should be safe to share the fixture directory. In this patch, we specify the scope of the fixture to be "class", so that the fixture directory is shared by tests.
1 parent 3dbd662 commit a400ef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/t/unit/test_unit_load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@pytest.mark.bashcomp(cmd=None, cwd="_comp_load")
99
class TestCompLoad:
10-
@pytest.fixture
10+
@pytest.fixture(scope="class")
1111
def fixture_dir(self, bash, tmp_path_factory):
1212
"""Construct the fixture directory in a temporary directory.
1313

0 commit comments

Comments
 (0)