Add tests
This commit is contained in:
28
README.md
28
README.md
@@ -75,7 +75,33 @@ Install the built wheel elsewhere:
|
||||
uv pip install dist/*.whl
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Run the included unit tests with the standard library `unittest` runner.
|
||||
|
||||
```bash
|
||||
# Using uv
|
||||
uv run python -m unittest discover -s tests -v
|
||||
|
||||
# Or with an activated venv
|
||||
python -m unittest discover -s tests -v
|
||||
```
|
||||
|
||||
Run a single test file:
|
||||
|
||||
```bash
|
||||
uv run python -m unittest tests/test_api.py -v
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
Run directly from source without installing (useful while iterating):
|
||||
|
||||
```bash
|
||||
PYTHONPATH=src uv run python -m hysteria_panel
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- No module named `hysteria-panel`: ensure the project is installed (`uv sync` or `pip install -e .`).
|
||||
- No module named `hysteria_panel`: ensure the project is installed (`uv sync` or `pip install -e .`).
|
||||
- Cannot connect: verify host/port/secret and whether HTTPS is required.
|
||||
|
||||
Reference in New Issue
Block a user