Skip to content

Improve test data structure and coverage in test_nice_year section #46

@coderabbitai

Description

@coderabbitai

Several improvements are needed for better test data structure and coverage in the test_nice_year section.

This issue tracks the improvements suggested in PR #1.

Reference comment: #1 (comment)

🛠️ Refactor suggestion
ovos_date_parser/res/en-us/date_time_test.json
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"}
}

Opened by: @JarbasAl

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions