Commit 22da23afdb4e56bc35707c75d9d8e2b74293617e

Authored by Jürgen Knödlseder
1 parent e76e98c3

Remove tests that rely on exception catching.

See Bug #626.
test/test_GApplication.py
... ... @@ -160,14 +160,14 @@ class Test(GPythonTestSuite):
160 160 Test GPars.
161 161 """
162 162 # Test GPars constructor with bad filename.
163   - self.test_try("Test GPars constructor with bad filename")
164   - try:
165   - pars = GPars("testme.par")
166   - self.test_try_failure("Exception not thrown.")
167   - except:
168   - self.test_try_success()
169   - else:
170   - self.test_try_failure("This should never happen.")
  163 + #self.test_try("Test GPars constructor with bad filename")
  164 + #try:
  165 + # pars = GPars("testme.par")
  166 + # self.test_try_failure("Exception not thrown.")
  167 + #except:
  168 + # self.test_try_success()
  169 + #else:
  170 + # self.test_try_failure("This should never happen.")
171 171  
172 172 # Return
173 173 return
... ...
test/test_GSky.py
... ... @@ -169,14 +169,14 @@ class Test(GPythonTestSuite):
169 169 self.test_skymap_pixels(pixels, "HEALPix")
170 170  
171 171 # Save HEALPix skymap twice. The second saving should fail.
172   - try:
173   - pixels.save(file2, True)
174   - pixels.save(file2)
175   - except RuntimeError:
176   - pass
177   - else:
178   - raise RuntimeError("*** TEST ERROR: FITS file overwritten!")
179   - pixels.save(file2, True)
  172 + #try:
  173 + # pixels.save(file2, True)
  174 + # pixels.save(file2)
  175 + #except RuntimeError:
  176 + # pass
  177 + #else:
  178 + # raise RuntimeError("*** TEST ERROR: FITS file overwritten!")
  179 + #pixels.save(file2, True)
180 180  
181 181 # Load again HEALPix skymap
182 182 pixels = GSkymap(file1)
... ...