Skip to content

Commit 0f24d7d

Browse files
authored
Revise test commands in README.md
Updated test command syntax to use 'python -m unittest' for various test suites in README.
1 parent 290e705 commit 0f24d7d

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

tests/README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The CI/CD test workflow is at
5050

5151
## Core tests (test_*.py)
5252

53-
- Run `unittest tests.core`
53+
- Run `python -m unittest tests.core`
5454
- Focus on core functionalities.
5555
- Do not rely on external dependencies beyond the standard library.
5656
- Do not perform network access or corpus downloads.
@@ -59,22 +59,21 @@ The CI/CD test workflow is at
5959

6060
## Compact tests (testc_*.py)
6161

62-
- Run `unittest tests.compact`
62+
- Run `python -m unittest tests.compact`
6363
- Need dependencies from `pip install "pythainlp[compact]"`
6464
- Test a limited set of functionalities that rely on a stable
6565
and small set of dependencies.
6666
- These dependencies are `PyYAML`, `nlpo3`, `numpy`, `pyicu`,
67-
`python-crfsuite`, and `requests`.
68-
- Includes corpus download/remove tests (require network access and `requests`)
69-
and any tests that depend on `numpy` or `python-crfsuite`.
67+
and `python-crfsuite`.
68+
- Includes corpus download/remove tests (may require network access).
7069
- Tested on:
7170
- All OSes: earliest and second-latest supported Python versions
7271
- Ubuntu: additionally tested on the latest version
7372
- Test case class suffix: `TestCaseC`
7473

7574
## Extra tests (testx_*.py)
7675

77-
- Run `unittest tests.extra`
76+
- Run `python -m unittest tests.extra`
7877
- Need dependencies from `pip install "pythainlp[compact,extra]"`
7978
- Test more functionalities that rely on larger set of dependencies
8079
or one that require more time or computation.
@@ -107,7 +106,7 @@ By separating tests by dependency group, we can:
107106

108107
#### Umbrella suite: tests.noauto
109108

110-
- Run `unittest tests.noauto`
109+
- Run `python -m unittest tests.noauto`
111110
- Includes all modular noauto test suites
112111
- Use this for comprehensive testing when all dependencies are available
113112
- Test case class suffix: `TestCaseN`
@@ -116,7 +115,7 @@ By separating tests by dependency group, we can:
116115

117116
##### PyTorch-based: tests.noauto_torch
118117

119-
- Run `unittest tests.noauto_torch`
118+
- Run `python -m unittest tests.noauto_torch`
120119
- Need dependencies from `pip install "pythainlp[noauto-torch]"`
121120
- Tests requiring PyTorch and its ecosystem:
122121
- torch, transformers (PyTorch backend)
@@ -129,7 +128,7 @@ By separating tests by dependency group, we can:
129128

130129
##### TensorFlow-based: tests.noauto_tensorflow
131130

132-
- Run `unittest tests.noauto_tensorflow`
131+
- Run `python -m unittest tests.noauto_tensorflow`
133132
- Need dependencies from `pip install "pythainlp[noauto-tensorflow]"`
134133
- Tests requiring TensorFlow:
135134
- deepcut tokenizer
@@ -139,7 +138,7 @@ By separating tests by dependency group, we can:
139138

140139
##### ONNX Runtime-based: tests.noauto_onnx
141140

142-
- Run `unittest tests.noauto_onnx`
141+
- Run `python -m unittest tests.noauto_onnx`
143142
- Need dependencies from `pip install "pythainlp[noauto-onnx]"`
144143
- Tests requiring ONNX Runtime:
145144
- oskut, sefr_cut tokenizers
@@ -148,7 +147,7 @@ By separating tests by dependency group, we can:
148147

149148
##### Cython-compiled: tests.noauto_cython
150149

151-
- Run `unittest tests.noauto_cython`
150+
- Run `python -m unittest tests.noauto_cython`
152151
- Need dependencies from `pip install "pythainlp[noauto-cython]"`
153152
- Tests requiring Cython-compiled packages:
154153
- phunspell spell checker
@@ -158,7 +157,7 @@ By separating tests by dependency group, we can:
158157

159158
##### Network-dependent: tests.noauto_network
160159

161-
- Run `unittest tests.noauto_network`
160+
- Run `python -m unittest tests.noauto_network`
162161
- Need dependencies from `pip install "pythainlp[noauto-network]"`
163162
- Tests requiring network access:
164163
- Hugging Face Hub model downloads

0 commit comments

Comments
 (0)