Add admin port support with other major refactorations
This commit is contained in:
@@ -8,18 +8,20 @@ We welcome contributions from the community! To maintain the high quality of thi
|
||||
- **Minimal Dependencies:** Only add new dependencies if absolutely necessary.
|
||||
|
||||
## Testing Mandate
|
||||
We enforce **100% test coverage**. Any new feature or bug fix must include corresponding tests.
|
||||
We enforce **100% test coverage for normal (non-E2E) tests**. Any new feature or bug fix must include corresponding tests and maintain this coverage standard. E2E tests are only required to cover every public function with multiple inputs, and do not require 100% code coverage.
|
||||
|
||||
### Running Tests
|
||||
Use `pytest` within the virtual environment:
|
||||
For detailed testing instructions, please refer to the [Testing Guide](file:///home/kovagoadi/openttd-client/docs/TESTING.md).
|
||||
|
||||
Quick command to run normal (non-E2E) tests:
|
||||
```bash
|
||||
PYTHONPATH=lib ./venv/bin/pytest --cov=openttd --cov-report=term-missing tests/
|
||||
./venv/bin/pytest -m "not e2e"
|
||||
```
|
||||
|
||||
### Types of Tests
|
||||
- **Logic Tests (`tests/test_logic.py`):** High-level client state and API behavior.
|
||||
- **Protocol Tests (`tests/test_protocol.py`):** Low-level binary parsing and encryption.
|
||||
- **E2E Tests (`tests/test_e2e.py`):** Integration tests against a live server.
|
||||
Quick command to run all tests (including E2E):
|
||||
```bash
|
||||
./venv/bin/pytest
|
||||
```
|
||||
|
||||
## Submitting Changes
|
||||
1. **Fork the repo** and create your branch from `main`.
|
||||
|
||||
Reference in New Issue
Block a user