Skip to content

Commit bc920a1

Browse files
authored
Update README.md
1 parent b536a8b commit bc920a1

1 file changed

Lines changed: 34 additions & 12 deletions

File tree

tests/README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,61 @@
1-
# Test cases
1+
# Test suites and execution
22

3-
The default test suite, triggered by the `unittest tests` command, encompasses
4-
all test cases within the `tests.core` and `tests.compact` packages.
5-
This suite is defined within the `__init__.py` file in this directory.
3+
The default test suite is executed using the `unittest tests` command.
4+
It includes all test cases within the `tests.core` and `tests.compact`
5+
packages, as defined in the `tests/__init__.py` file.
66

7-
Tests are categorized into three groups: core, compact, and extra.
7+
To optimize CI/CD resource utilization and manage dependency overhead,
8+
tests are categorized into four tiers based on their resource
9+
requirements and complexity: "core", "compact", "extra", and "noauto".
810

11+
The following table outlines the automated test coverage across
12+
supported Python versions and operating systems:
13+
14+
| Python | Ubuntu | Windows | macOS |
15+
| -------------- | ------- | ------- | ----- |
16+
| 3.14 (Latest) | O+C | O | O |
17+
| 3.13 | O+C+X | O+C | O+C |
18+
| 3.12 | O | | |
19+
| 3.11 | O | | |
20+
| 3.10 | O | | |
21+
| 3.9 (Earliest) | O+C | O+C | O+C |
22+
923
## Core tests (test_*.py)
1024

1125
- Run `unittest tests.core`
1226
- Focus on core functionalities.
1327
- Do not rely on external dependencies beyond the standard library.
14-
- Test with all officially supported Python versions
15-
(currently 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14).
28+
- Tested on all supported operating systems and all active Python versions.
29+
- Test case class suffix: `TestCase`
1630

1731
## Compact tests (testc_*.py)
1832

1933
- Run `unittest tests.compact`
20-
- Test a limited set of functionalities that rely on a stable and small subset
21-
of optional dependencies specified in `pyproject.toml`.
34+
- Need dependencies from `pip install "pythainlp[compact]"`
35+
- Test a limited set of functionalities that rely on a stable
36+
and small set of dependencies.
2237
- These dependencies are `PyYAML`, `nlpo3`, `numpy`, `pyicu`,
2338
`python-crfsuite`, and `requests`.
24-
- Test with the latest two stable Python versions.
39+
- Tested on:
40+
- All OSes: earliest and second-latest supported Python versions
41+
- Ubuntu: additionally tested on the latest version
42+
- Test case class suffix: `TestCaseC`
2543

2644
## Extra tests (testx_*.py)
2745

2846
- Run `unittest tests.extra`
29-
- Explore functionalities that rely on optional dependencies specified in the
30-
`project.optional-dependencies` section of `pyproject.toml`.
47+
- Need dependencies from `pip install "pythainlp[compact,extra]"`
48+
- Test more functionalities that rely on larger set of dependencies
49+
or one that require more time or computation.
50+
- Only tested on Ubuntu using the second-latest Python version.
51+
- Test case class suffix: `TestCaseX`
3152

3253
## Noauto tests (testn_*.py)
3354

3455
- These dependencies might include huge libraries like `tensorflow`.
3556
- Due to dependency complexities, these functionalities may not be tested
3657
in the CI/CD pipeline.
58+
- Test case class suffix: `TestCaseN`
3759

3860
## Robustness tests (test_robustness.py)
3961

0 commit comments

Comments
 (0)