OpenVoiceOS / OpenVoiceOS/ovos-date-parser

Expand time format test coverage

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

@JarbasAl is already working on this.

Since Nov 7, 2024.

en
Dominant language
Python
Stars
0
Forks
8
Avg merge
7h 9m
Merged PRs (30d)
17

Description

Description

Track the expansion of time format test coverage.
ovos_date_parser/res/en-us/date_time_test.json
🛠️ Refactor suggestion

Improve test data structure and coverage in test_nice_year section.

Several improvements are needed for better test data structure and coverage:

  1. Use proper JSON array format for datetime_param instead of comma-separated strings
  2. Use JSON boolean values instead of strings for the "bc" field
  3. Add missing test cases for edge scenarios

Apply these changes to improve the test data structure:

  "test_nice_year": {
-   "1": {"datetime_param": "1, 1, 31, 13, 22, 3", "bc": "True", "assertEqual": "one b.c." },
+   "1": {"datetime_param": [1, 1, 31, 13, 22, 3], "bc": true, "assertEqual": "one B.C." },

Consider adding these test cases:

{
  "25": {"datetime_param": [0, 1, 31, 13, 22, 3], "bc": false, "assertEqual": "zero"},
  "26": {"datetime_param": [9999, 1, 31, 13, 22, 3], "bc": false, "assertEqual": "nine thousand nine hundred ninety nine"},
  "27": {"datetime_param": [10000, 1, 31, 13, 22, 3], "bc": false, "assertEqual": "ten thousand"}
}

Requester: @JarbasAl

References:

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.