opensafely-core / opensafely-core/opencodelists
Consider refactoring BNF coding systems import data to be like other tests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
As mentioned in #2264, test_import_data.py for the BNF coding system currently uses a pytest fixture for the data to be imported.
Other analogous tests for other coding systems use repository data fixtures instead; example.
We could make these tests slightly more uniform by making the BNF import data tests do the same: use a repository data fixture, instead of a generated-by-pytest fixture.
On the other hand, we may later refactor these code and tests entirely, and it may not be worth doing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare coding_systems/bnf/tests/test_import_data.py with the analogous coding_systems/dmd/tests/test_import_data.py, focusing on how each test obtains import data. Check whether the BNF tests can use a repository data fixture in the same way; the work is done when the BNF tests use that fixture consistently, if this refactor is still wanted.
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
- Mostly clear
- Newbie friendliness
- 45/100