Completed
Pull Request — master (#623)
by
unknown
57s
created

tests.change_directory()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 1
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
"""
5
conftest
6
--------
7
8
Contains pytest fixtures which are globally available throughout the suite.
9
"""
10
11
import os
12
import pytest
13
14
15
@pytest.fixture(scope='function', autouse=True)
16
def global_setup(tmpdir, monkeypatch):
17
    home = tmpdir.mkdir('home')
18
    monkeypatch.setenv('HOME', home)
19
20
21
@pytest.fixture(scope='function', autouse=True)
22
def change_directory(tmpdir):
23
    os.chdir(str(tmpdir))
24