Changeset View
Changeset View
Standalone View
Standalone View
swh/vault/tests/conftest.py
Show All 11 Lines | |||||
from swh.core.db.pytest_plugin import postgresql_fact | from swh.core.db.pytest_plugin import postgresql_fact | ||||
from swh.storage.tests import SQL_DIR as STORAGE_SQL_DIR | from swh.storage.tests import SQL_DIR as STORAGE_SQL_DIR | ||||
import swh.vault | import swh.vault | ||||
from swh.vault import get_vault | from swh.vault import get_vault | ||||
os.environ["LC_ALL"] = "C.UTF-8" | os.environ["LC_ALL"] = "C.UTF-8" | ||||
# needed for directory tests on git-cloned repositories | |||||
# 022 is usually the default value, but some environments (eg. Debian builds) have | |||||
# a different one. | |||||
os.umask(0o022) | |||||
pytest_v = pkg_resources.get_distribution("pytest").parsed_version | pytest_v = pkg_resources.get_distribution("pytest").parsed_version | ||||
if pytest_v < pkg_resources.extern.packaging.version.parse("3.9"): | if pytest_v < pkg_resources.extern.packaging.version.parse("3.9"): | ||||
@pytest.fixture | @pytest.fixture | ||||
def tmp_path(): | def tmp_path(): | ||||
import pathlib | import pathlib | ||||
import tempfile | import tempfile | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |