GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( 69efa7...3bf7f5 )
by Sabiha
02:48 queued 11s
created

voltcycle.functions_and_tests.test_peak_detection_fxn   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 66.67 %

Importance

Changes 0
Metric Value
eloc 12
dl 16
loc 24
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_peak_detection_fxn() 16 16 2

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
"""This module contains the function that test the
2
peak_detection_fxn() function. It calls the core.py
3
file which contains the function to be tested."""
4
5
import numpy as np
6
import core
7
8 View Code Duplication
def test_peak_detection_fxn():
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
9
    """This function tests the peak_detection_fxn() function."""
10
    read_file = core.read_file('../data/10mM_2,7-AQDS_1M_KOH_25mVs_0.5step_2.txt')
11
    file_df = core.data_frame(read_file, 2)
12
    y_column = file_df['Current']
13
    df2 = core.peak_detection_fxn(y_column)
14
15
    # check that the output is a list
16
    assert isinstance(df2, list)
17
18
    # check that there are two outputs
19
    assert (len(df2)) == 2
20
21
    # check if the outputs are integer values
22
    for i in range(len(df2)):
23
        assert isinstance(df2[i], np.int32)
24