### Install test dependencies Source: https://github.com/allstarlink/asl3/blob/develop/TESTING.md Command to install the required Python packages for running tests. ```bash pip install pytest requests ``` -------------------------------- ### Play immediately with allstar-play-arn Source: https://github.com/allstarlink/asl3/blob/develop/bin/asl-play-arn.1.md Basic command to play the news immediately on node 1999. Playback may start after a significant delay depending on device speed and internet connectivity. ```bash allstar-play-arn --node 1999 ``` -------------------------------- ### sa818-menu usage synopsis Source: https://github.com/allstarlink/asl3/blob/develop/bin/sa818-menu.1.md Shows the command-line usage for sa818-menu. Run with no options to open the interactive menu; use --apply to re-apply the saved configuration without the menu. ```bash /usr/bin/sa818-menu [-h] [--conf ] [--apply] [--debug] ``` -------------------------------- ### Troubleshoot import errors Source: https://github.com/allstarlink/asl3/blob/develop/TESTING.md Commands to verify the project root and Python path when encountering import errors. ```bash # Ensure you're in the project root cd /path/to/ASL3 # Verify python path includes the scripts python3 -c "import sys; sys.path.insert(0, '.'); exec(open('tests/test_check_node_status.py').read())" ``` -------------------------------- ### Enable systemd timer for scheduled playback Source: https://github.com/allstarlink/asl3/blob/develop/bin/asl-play-arn.1.md Commands to reload systemd and enable the asl-play-arn timer after configuring the timer and service files. ```bash systemctl daemon-reload systemctl enable asl-play-arn.timer ``` -------------------------------- ### Run tests using Makefile and pytest Source: https://github.com/allstarlink/asl3/blob/develop/TESTING.md Commands to execute various test suites, specific files, or coverage reports using Makefile targets and pytest. ```bash # Run all stable, passing tests make test # Run all Python tests (including those with known issues) make test-python # Run specific test file pytest tests/test_asl_node_auth_check/test_asl_node_auth_check_core.py -v # Run tests with coverage pytest tests/ --cov=bin/ ``` -------------------------------- ### Run all Python tests with make test-python-all Source: https://github.com/allstarlink/asl3/blob/develop/TEST_COVERAGE.md Runs all Python tests, including those with known mocking issues. ```bash make test-python-all # or pytest tests/ ``` -------------------------------- ### Run all stable tests with make test Source: https://github.com/allstarlink/asl3/blob/develop/TEST_COVERAGE.md Runs all stable tests. Use either the Makefile target or the direct pytest command. ```bash make test # or pytest tests/test_check_node_status.py tests/test_asl_node_auth_check_core.py ``` -------------------------------- ### sa818 command-line usage Source: https://github.com/allstarlink/asl3/blob/develop/bin/sa818.1.md Shows the general command-line usage of the sa818 utility. The positional argument must be one of radio, volume, filters, filter, or version. Optional arguments include -h, --debug, --port, and --speed. ```text /usr/bin/sa818 [-h] [--debug] [--port PORT] [--speed SPEED] ``` -------------------------------- ### Generate code coverage report Source: https://github.com/allstarlink/asl3/blob/develop/TESTING.md Command to generate an HTML coverage report for specific test files. ```bash pytest tests/test_check_node_status.py tests/test_asl_node_auth_check_core.py \ --cov=bin/asl-node-auth-check \ --cov-report=html ``` -------------------------------- ### Run tests in CI with pytest -q Source: https://github.com/allstarlink/asl3/blob/develop/TEST_COVERAGE.md Runs all tests in CI pipeline with quiet output. ```bash pytest -q tests ``` -------------------------------- ### Python test file template Source: https://github.com/allstarlink/asl3/blob/develop/TESTING.md A template for creating new Python test files using the unittest framework. ```python import unittest from unittest.mock import patch class TestMyFeature(unittest.TestCase): def test_something(self): """Brief description of what is being tested.""" # Test code here pass if __name__ == "__main__": unittest.main() ``` -------------------------------- ### Troubleshoot test discovery Source: https://github.com/allstarlink/asl3/blob/develop/TESTING.md Command to verify which tests pytest discovers in the project. ```bash # Check what pytest finds pytest --collect-only tests/ # Ensure test file starts with test_ # and test functions start with test_ ``` -------------------------------- ### Run tests with stable marker Source: https://github.com/allstarlink/asl3/blob/develop/TEST_COVERAGE.md Runs only tests marked as stable using the -m option. ```bash pytest tests/ -m stable # Run only stable tests ``` -------------------------------- ### app_rpt timeout timer enable/disable commands Source: https://github.com/allstarlink/asl3/blob/develop/bin/asl-play-arn.1.md Commands to add to /etc/asterisk/rpt.conf to enable and disable the timeout timer (TOT). These appear as commented-out options in the stock rpt.conf. ```asterisk 907=cop,7 ; Time out timer enable 908=cop,8 ; Time out timer disable ``` -------------------------------- ### Run specific test file with pytest Source: https://github.com/allstarlink/asl3/blob/develop/TEST_COVERAGE.md Runs a specific test file with verbose output. ```bash pytest tests/test_asl_node_auth_check_core.py -v ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.