File size: 358 Bytes
998bb30
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from datetime import datetime
from pathlib import Path

import pytest
from pytest import TempPathFactory


@pytest.fixture(scope='function')
def tmp_work_dirs(tmp_path_factory: TempPathFactory) -> Path:
    relative_work_dirs = datetime.now().strftime('%Y-%m-%d-%H-%M-%S-%f')
    work_dirs = tmp_path_factory.mktemp(relative_work_dirs)

    return work_dirs