Passed
Push — main ( ec3fe3...82dd22 )
by Douglas
02:00
created

tests.analysis.test_prep   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A TestPrep.test_matrix_prep() 0 5 1
1
import pytest
0 ignored issues
show
introduced by
Unable to import 'pytest'
Loading history...
introduced by
Missing module docstring
Loading history...
2
from pocketutils.core.dot_dict import NestedDotDict
0 ignored issues
show
introduced by
Unable to import 'pocketutils.core.dot_dict'
Loading history...
Unused Code introduced by
Unused NestedDotDict imported from pocketutils.core.dot_dict
Loading history...
3
4
from mandos.analysis.io_defns import *
0 ignored issues
show
Unused Code introduced by
PsiProjectedDf was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
TypedDfs was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Optional was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Union was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Set was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Sequence was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Dict was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
Collection was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
cycle was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
defaultdict was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
EnrichmentDf was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
ConcordanceDf was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
ScoreDf was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
SimilarityDfShortForm was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
SimilarityDfLongForm was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
pd was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
np was imported with wildcard, but is not used.
Loading history...
Unused Code introduced by
math was imported with wildcard, but is not used.
Loading history...
Coding Style introduced by
The usage of wildcard imports like mandos.analysis.io_defns should generally be avoided.
Loading history...
Unused Code introduced by
Tuple was imported with wildcard, but is not used.
Loading history...
5
from mandos.analysis.prepping import MatrixPrep
6
7
from .. import get_test_resource
8
9
10
class TestPrep:
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
11
    def test_matrix_prep(self):
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
Coding Style introduced by
This method could be written as a function/class method.

If a method does not access any attributes of the class, it could also be implemented as a function or static method. This can help improve readability. For example

class Foo:
    def some_method(self, x, y):
        return x + y;

could be written as

class Foo:
    @classmethod
    def some_method(cls, x, y):
        return x + y;
Loading history...
12
        df = MatrixPrep("phi").from_files([get_test_resource("shortform-matrix.csv")])
0 ignored issues
show
Coding Style Naming introduced by
Variable name "df" doesn't conform to snake_case naming style ('([^\\W\\dA-Z][^\\WA-Z]2,|_[^\\WA-Z]*|__[^\\WA-Z\\d_][^\\WA-Z]+__)$' pattern)

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
13
        assert len(df) == 6
14
        assert df["key"].unique().tolist() == ["shortform-matrix"]
15
        assert df["type"].unique().tolist() == ["phi"]
16
17
18
if __name__ == "__main__":
19
    pytest.main()
20