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

tests.clean_system()   B

Complexity

Conditions 5

Size

Total Lines 90

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 90
rs 7.87
cc 5

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

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