Clean up unit tests (#1020)
This commit is contained in:
@@ -1,26 +1,32 @@
|
||||
# Run Unit Tests
|
||||
|
||||
## Test Frontend Language
|
||||
SGLang uses the built-in library [unittest](https://docs.python.org/3/library/unittest.html) as the testing framework.
|
||||
|
||||
## Test Backend Runtime
|
||||
```bash
|
||||
cd sglang/test/srt
|
||||
|
||||
# Run a single file
|
||||
python3 test_srt_endpoint.py
|
||||
|
||||
# Run a single test
|
||||
python3 -m unittest test_srt_endpoint.TestSRTEndpoint.test_simple_decode
|
||||
|
||||
# Run a suite with multiple files
|
||||
python3 run_suite.py --suite minimal
|
||||
```
|
||||
|
||||
## Test Frontend Language
|
||||
```bash
|
||||
cd sglang/test/lang
|
||||
export OPENAI_API_KEY=sk-*****
|
||||
|
||||
# Run a single file
|
||||
python3 test_openai_backend.py
|
||||
|
||||
# Run a suite
|
||||
# Run a single test
|
||||
python3 -m unittest test_openai_backend.TestOpenAIBackend.test_few_shot_qa
|
||||
|
||||
# Run a suite with multiple files
|
||||
python3 run_suite.py --suite minimal
|
||||
```
|
||||
|
||||
## Test Backend Runtime
|
||||
```
|
||||
cd sglang/test/srt
|
||||
|
||||
# Run a single file
|
||||
python3 test_eval_accuracy.py
|
||||
|
||||
# Run a suite
|
||||
python3 run_suite.py --suite minimal
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user