add test for bustiness

This commit is contained in:
alexanderott 2020-06-01 12:17:25 +02:00
parent 8fc99a356d
commit 859faae812

27
unittests/testBaseline.py Normal file
View File

@ -0,0 +1,27 @@
import unittest
import numpy as np
import helperFunctions as hF
import matplotlib.pyplot as plt
from CellData import icelldata_of_dir
from Baseline import BaselineCellData
import os
class BaselineTester(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_get_burstiness(self):
for cell in icelldata_of_dir("../data/"):
baseline = BaselineCellData(cell)
bursty = baseline.get_burstiness()
self.assertTrue(bursty <= 1)
self.assertTrue(bursty >= 0)