OpenVoiceOS / OpenVoiceOS/ovos-date-parser
ca/Inconsistencies and gaps in test cases for years in date_time_test.json
Open
@JarbasAl is already working on this.
Since Nov 7, 2024.
ca
- Dominant language
- Python
- Stars
- 0
- Forks
- 8
- Avg merge
- 7h 9m
- Merged PRs (30d)
- 17
Description
It was observed that the test cases for years in date_time_test.json have inconsistencies and gaps.\n\nPR: https://github.com/OpenVoiceOS/ovos-date-parser/pull/1\nComment: https://github.com/OpenVoiceOS/ovos-date-parser/pull/1#discussion_r1831942303\n\nRequested by: @JarbasAl
🛠️ Refactor suggestion
Standardize BC flag values and add missing edge cases.
The test cases for years have some inconsistencies and gaps:
- The
bcflag uses inconsistent values:"None"vs"False"(e.g., lines 6 vs 24) - Missing important edge cases:
- Year 0 (invalid in both BC and AD)
- Negative years
- Maximum supported year
Consider:
- Standardizing the
bcflag to use"False"instead of"None" - Adding test cases for edge cases to ensure proper error handling
Contributor guide
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.
Assessment
This issue has not been assessed yet.