File: conftest.py

package info (click to toggle)
python-b2sdk 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,020 kB
  • sloc: python: 30,902; sh: 13; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
######################################################################
#
# File: test/conftest.py
#
# Copyright 2023 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
import concurrent.futures

import pytest


@pytest.fixture
def bg_executor():
    with concurrent.futures.ThreadPoolExecutor() as executor:
        yield executor


@pytest.fixture
def apiver_module():
    """
    b2sdk apiver module fixture.

    A compatibility function that is to be replaced by `pytest-apiver` plugin in the future.
    """
    import apiver_deps  # noqa: F401

    return apiver_deps