gdm.test.TestFindRoot   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 14
Duplicated Lines 0 %
Metric Value
dl 0
loc 14
rs 10
wmc 8

4 Methods

Rating   Name   Duplication   Size   Complexity  
A test_specified() 0 3 2
A test_none() 0 2 2
A test_current() 0 2 2
A test_missing() 0 2 2
1
# pylint: disable=no-self-use
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
3
import os
4
5
from .conftest import ROOT, FILES
6
7
from gdm.commands import _find_root, install, update, display, delete
8
9
PROJECT_ROOT = os.path.dirname(os.path.dirname(ROOT))
10
PROJECT_PARENT = os.path.dirname(PROJECT_ROOT)
11
12
13
class TestCommands:
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
14
15
    def test_commands_can_be_run_without_project(self, tmpdir):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
16
        tmpdir.chdir()
17
18
        assert not install()
19
        assert not update()
20
        assert not display()
21
        assert not delete()
22
23
24
class TestFindRoot:
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
25
26
    def test_specified(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
27
        os.chdir(PROJECT_PARENT)
28
        assert FILES == _find_root(FILES)
29
30
    def test_none(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
31
        assert PROJECT_ROOT == _find_root(None, cwd=ROOT)
32
33
    def test_current(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
34
        assert PROJECT_ROOT == _find_root(PROJECT_ROOT, cwd=ROOT)
35
36
    def test_missing(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
37
        assert PROJECT_PARENT == _find_root(None, cwd=PROJECT_PARENT)
38