Debian Codegraph @

test/conftest.py

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 # -*- coding: utf-8 -*-
2 import os
3 import os.path
4
5 import pytest
6
7 # Statically look for all the files.
8 curdir = os.path.split(os.path.dirname(__file__))[0]
9 TEST_DATA_DIR = os.path.join(curdir, 'libbrotli', 'tests', 'testdata')
10 simple_test_files = [
11 ]
12 compressed_simple_test_files = set(
13 f for f in simple_test_files if f.endswith('.compressed')
14 )
15
16
17 @pytest.fixture(params=compressed_simple_test_files)
18 def simple_compressed_file(request):
19 """
20 Returns a two-tuple: (uncompressed_file, compressed_file), from the Brotli
21 test fixtures.
22 """
23 file = request.param
24 return (file[:-len('.compressed')], file)
25
26
27 @pytest.fixture(scope='session')
28 def one_compressed_file():
29 return os.path.join(TEST_DATA_DIR, 'alice29.txt')