From 21f919b14a9aeaa08aecbcdd41a530198315aad1 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 30 Aug 2020 16:24:10 +0200 Subject: tests: Use module-scope fixtures whenever possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- tests/test_verify.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_verify.py') diff --git a/tests/test_verify.py b/tests/test_verify.py index c613706..79c5513 100644 --- a/tests/test_verify.py +++ b/tests/test_verify.py @@ -28,9 +28,10 @@ from gemato.verify import ( TEST_STRING = b'The quick brown fox jumps over the lazy dog' -@pytest.fixture -def test_tree(tmp_path): +@pytest.fixture(scope='module') +def test_tree(tmp_path_factory): """Test tree with different file types needed for tests""" + tmp_path = tmp_path_factory.mktemp('verify-') with open(tmp_path / 'empty-file', 'w'): pass with open(tmp_path / 'regular-file', 'wb') as f: -- cgit v1.2.3