def test_coherence_fails_if_data2_not_lc(self): data = np.array([[1,2,3,4,5],[2,3,4,5,1]]) with pytest.raises(TypeError): coh = coherence(data, self.lc2)
def test_coherence_computes_correctly(self): coh = coherence(self.lc1, self.lc2) assert len(coh) == 2 assert np.abs(np.mean(coh)) < 1
def test_coherence_computes_correctly(self): with pytest.warns(UserWarning) as record: coh = coherence(self.lc1, self.lc2) assert len(coh) == 2 assert np.abs(np.mean(coh)) < 1
def test_coherence_runs(self): coh = coherence(self.lc1, self.lc2)
def test_coherence_runs(self): with pytest.warns(UserWarning) as record: coh = coherence(self.lc1, self.lc2)
def test_coherence_fails_if_data2_not_lc(self): data = np.array([[1,2,3,4,5],[2,3,4,5,1]]) with pytest.raises(AssertionError): coh = coherence(data, self.lc2)
def test_coherence_fails_if_data1_not_lc(self): data = np.array([[1,2,3,4,5],[2,3,4,5,1]]) with pytest.raises(TypeError): coh = coherence(self.lc1, data)