Skip to content

Commit

Permalink
Excluded some old code/non-relevant code from coverage. (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdenker authored and alperyeg committed Mar 16, 2018
1 parent 08d6ff1 commit 686dd26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions elephant/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ def cv2(v):

# sigma2kw and kw2sigma only needed for oldfct_instantaneous_rate!
# to finally be taken out of Elephant
def sigma2kw(form):

def sigma2kw(form): # pragma: no cover
warnings.simplefilter('always', DeprecationWarning)
warnings.warn("deprecated", DeprecationWarning, stacklevel=2)
if form.upper() == 'BOX':
Expand All @@ -332,14 +333,14 @@ def sigma2kw(form):
return coeff


def kw2sigma(form):
def kw2sigma(form): # pragma: no cover
warnings.simplefilter('always', DeprecationWarning)
warnings.warn("deprecated", DeprecationWarning, stacklevel=2)
return 1/sigma2kw(form)


# to finally be taken out of Elephant
def make_kernel(form, sigma, sampling_period, direction=1):
def make_kernel(form, sigma, sampling_period, direction=1): # pragma: no cover
"""
Creates kernel functions for convolution.
Expand Down Expand Up @@ -506,7 +507,7 @@ def make_kernel(form, sigma, sampling_period, direction=1):
# to finally be taken out of Elephant
def oldfct_instantaneous_rate(spiketrain, sampling_period, form,
sigma='auto', t_start=None, t_stop=None,
acausal=True, trim=False):
acausal=True, trim=False): # pragma: no cover
"""
Estimate instantaneous firing rate by kernel convolution.
Expand Down
2 changes: 1 addition & 1 deletion elephant/test/make_spike_extraction_test_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def main():
def main(): # pragma: no cover
from brian2 import start_scope,mvolt,ms,NeuronGroup,StateMonitor,run
import matplotlib.pyplot as plt
import neo
Expand Down

0 comments on commit 686dd26

Please sign in to comment.