These are chat archives for astropy/astropy

3rd
Mar 2017
matrixbot
@matrixbot
Mar 03 2017 11:34
bsipocz test
Brigitta Sipocz
@bsipocz
Mar 03 2017 11:37
@Cadair does it work
matrixbot
@matrixbot
Mar 03 2017 11:37
Cadair bsipocz
Mohan Agrawal
@mohanagr
Mar 03 2017 13:55
In the scripts in io/fits/scripts/ warnings and errors are logged using loggers.
How to catch them in tests?
the other tests use the custom catch_warnings class but since that inherits from warnings.catch_warnings that'll catch emitted warnings right. How to get the ones which are logged?
my case: I was writing a test for fitsheader. The script warns if -k option is used and the given keyword is not found.
Same goes for erros. Eg. if file not found. It logs the Error.
Mohan Agrawal
@mohanagr
Mar 03 2017 14:53
I'm using regex as of now
Mohan Agrawal
@mohanagr
Mar 03 2017 18:43
@bsipocz @Cadair Can you elaborate on the separation of test helper project. I really think we can make more use of pytest's features.
I was going through the code and was writing tests for issue #5799 (PR #5858 ). Can you please elaborate on that too