def test_invalid_type_attribute_with_multiple_lcs(self):
     acs_test = AveragedCrossspectrum([self.lc1, self.lc2], [self.lc2, self.lc1], segment_size=1)
     acs_test.type = "invalid_type"
     with pytest.raises(ValueError):
         assert AveragedCrossspectrum._make_crossspectrum(
             acs_test, lc1=[self.lc1, self.lc2], lc2=[self.lc2, self.lc1]
         )
 def test_invalid_type_attribute(self):
     with pytest.raises(ValueError):
         cs_test = AveragedCrossspectrum(self.lc1, self.lc2, segment_size=1)
         cs_test.type = 'invalid_type'
         assert AveragedCrossspectrum._make_crossspectrum(cs_test,
                                                          self.lc1,
                                                          self.lc2)
Example #3
0
 def test_invalid_type_attribute_with_multiple_lcs(self):
     with pytest.warns(UserWarning) as record:
         acs_test = AveragedCrossspectrum([self.lc1, self.lc2],
                                          [self.lc2, self.lc1],
                                          segment_size=1)
     acs_test.type = 'invalid_type'
     with pytest.raises(ValueError) as excinfo:
         assert AveragedCrossspectrum._make_crossspectrum(
             acs_test, [self.lc1, self.lc2], [self.lc2, self.lc1])
     assert "Type of spectrum not recognized" in str(excinfo.value)
Example #4
0
 def test_invalid_type_attribute_with_multiple_lcs(self):
     acs_test = AveragedCrossspectrum([self.lc1, self.lc2],
                                      [self.lc2, self.lc1],
                                      segment_size=1)
     acs_test.type = 'invalid_type'
     with pytest.raises(ValueError):
         assert AveragedCrossspectrum._make_crossspectrum(acs_test,
                                                          lc1=[self.lc1,
                                                               self.lc2],
                                                          lc2=[self.lc2,
                                                               self.lc1])
Example #5
0
 def test_invalid_type_attribute(self):
     with pytest.raises(ValueError):
         cs_test = AveragedCrossspectrum(self.lc1, self.lc2, segment_size=1)
         cs_test.type = 'invalid_type'
         assert AveragedCrossspectrum._make_crossspectrum(
             cs_test, self.lc1, self.lc2)