diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-08-30 16:24:10 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-08-30 16:24:10 +0200 |
commit | 21f919b14a9aeaa08aecbcdd41a530198315aad1 (patch) | |
tree | a23c4663c499324378d6f486c3c8e35ae5ba034c /tests/test_find_top_level.py | |
parent | f6dcfd5c6fe1338b74d502284cd524549b6edde9 (diff) | |
download | gemato-21f919b14a9aeaa08aecbcdd41a530198315aad1.tar.gz |
tests: Use module-scope fixtures whenever possible
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests/test_find_top_level.py')
-rw-r--r-- | tests/test_find_top_level.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_find_top_level.py b/tests/test_find_top_level.py index b5e6a15..184fe72 100644 --- a/tests/test_find_top_level.py +++ b/tests/test_find_top_level.py @@ -12,8 +12,9 @@ import pytest from gemato.find_top_level import find_top_level_manifest -@pytest.fixture -def plain_tree(tmp_path): +@pytest.fixture(scope='module') +def plain_tree(tmp_path_factory): + tmp_path = tmp_path_factory.mktemp('find-top-level-plain-') for d in ('empty-subdir', 'manifest-subdir', 'deep/manifest-subdir', @@ -84,8 +85,9 @@ def test_cross_device(tmp_path): assert find_top_level_manifest(tmp_path / 'test') is None -@pytest.fixture -def compressed_manifest_tree(tmp_path): +@pytest.fixture(scope='module') +def compressed_manifest_tree(tmp_path_factory): + tmp_path = tmp_path_factory.mktemp('find-top-level-compressed-') for d in ('empty-subdir', 'manifest-subdir', 'deep/manifest-subdir', |