OpenVoiceOS / OpenVoiceOS/ovos-date-parser

ca/Inconsistencies and gaps in test cases for years in date_time_test.json

Open
#45 0 comments 0 reactions 1 assignee View on GitHub

@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:

  1. The bc flag uses inconsistent values: "None" vs "False" (e.g., lines 6 vs 24)
  2. Missing important edge cases:
    • Year 0 (invalid in both BC and AD)
    • Negative years
    • Maximum supported year

Consider:

  1. Standardizing the bc flag to use "False" instead of "None"
  2. Adding test cases for edge cases to ensure proper error handling

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.