File: conftest.py

package info (click to toggle)
metalfinder 2.1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 248 kB
  • sloc: python: 805; sh: 8; makefile: 7
file content (29 lines) | stat: -rw-r--r-- 567 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
#!/usr/bin/python3

"""Pytest fixtures to simplify tests"""

import pytest


@pytest.fixture
def cachedir(tmp_path):
    """Create temporary dir named 'cachedir'"""
    cache_dir = tmp_path / "cache"
    cache_dir.mkdir()
    return cache_dir


@pytest.fixture
def outdir(tmp_path):
    """Create temporary dir named 'outdir'"""
    out_dir = tmp_path / "out"
    out_dir.mkdir()
    return out_dir


@pytest.fixture
def musicdir(tmp_path):
    """Create temporary dir named 'musicdir'"""
    music_dir = tmp_path / "music"
    music_dir.mkdir()
    return music_dir