astropy / astropy/specutils

Testing: Test identifier functions

Open
#405 0 comments 0 reactions 0 assignees View on GitHub
testing
Dominant language
Python
Stars
204
Forks
134
Avg merge
12h 55m
Merged PRs (30d)
1

Description

Most test in https://github.com/astropy/specutils/blob/master/specutils/tests/test_loaders.py actively set the loader, e.g.:
```
spec = Spectrum1D.read(tmp_file.name, format="SDSS-III/IV spec")
```
All these tests should be parameterized to be run twice: With and without the `format` keyword to make sure that the identifier functions work. (This is very analogous to the `astropy.io.ascii` tests and experience there shows really both tests are needed.)

Contributor guide

Open the contributing guide

Research direction

Start in specutils/tests/test_loaders.py and review the existing tests that explicitly pass a format to Spectrum1D.read. Parameterize those tests so each runs with and without the format keyword, then run the loader test suite; done means both paths pass and identifier functions are exercised.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.