test.test_predict   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_predict() 0 9 1
1
import e2edutch.predict
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
from collections import OrderedDict
0 ignored issues
show
Unused Code introduced by
Unused OrderedDict imported from collections
Loading history...
introduced by
standard import "from collections import OrderedDict" should be placed before "import e2edutch.predict"
Loading history...
3
import tensorflow.compat.v1 as tf
0 ignored issues
show
introduced by
Unable to import 'tensorflow.compat.v1'
Loading history...
Unused Code introduced by
Unused tensorflow.compat.v1 imported as tf
Loading history...
introduced by
third party import "import tensorflow.compat.v1 as tf" should be placed before "import e2edutch.predict"
Loading history...
4
5
6
def test_predict():
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
7
    example = {
8
        'doc_key': 'test',
9
        'sentences': [['Een', 'zin', '.']]
10
    }
11
    predictor = e2edutch.predict.Predictor(model_name='final')
12
    clusters = predictor.predict(example)
13
    predictor.end_session()
14
    assert(len(clusters) >= 0)
0 ignored issues
show
Unused Code Coding Style introduced by
There is an unnecessary parenthesis after assert.
Loading history...
15