diff --git a/AUTHORS b/AUTHORS index e59aba4..fcfb6d3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -waboring@hemna.com : 1 \ No newline at end of file +waboring@hemna.com : 1 diff --git a/requirements-dev.txt b/requirements-dev.txt index fa49431..db152d7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -20,7 +20,7 @@ pyproject-api==1.10.0 # via tox pyproject-hooks==1.2.0 # via build, pip-tools pyyaml==6.0.3 # via pre-commit setuptools==80.9.0 # via pip-tools -tomli==2.3.0 # via build, pip-tools, pyproject-api, tox +tomli==2.4.0 # via build, pip-tools, pyproject-api, tox tox==4.32.0 # via -r requirements-dev.in typing-extensions==4.15.0 # via tox, virtualenv virtualenv==20.35.4 # via pre-commit, tox diff --git a/tests/threads/test_stats.py b/tests/threads/test_stats.py index ef137e6..7b3e097 100644 --- a/tests/threads/test_stats.py +++ b/tests/threads/test_stats.py @@ -131,14 +131,14 @@ class TestAPRSDStatsStoreThread(unittest.TestCase): # Mock the collector to raise an exception with mock.patch('aprsd.stats.collector.Collector') as mock_collector_class: mock_collector_instance = mock.Mock() - mock_collector_instance.collect.side_effect = Exception('Test exception') + mock_collector_instance.collect.side_effect = RuntimeError('Test exception') mock_collector_class.return_value = mock_collector_instance # Set loop_count to match save interval thread.loop_count = 10 # Should raise the exception - with self.assertRaises(Exception): + with self.assertRaises(RuntimeError): thread.loop() # Removed test_loop_count_increment as it's not meaningful to test in isolation diff --git a/tox.ini b/tox.ini index 2164e65..6050e0b 100644 --- a/tox.ini +++ b/tox.ini @@ -89,3 +89,27 @@ skip_install = true basepython = python3 deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure + +[testenv:fix] +description = run code formatter and linter (auto-fix) +skip_install = true +deps = + pre-commit-uv>=4.1.1 +commands = + pre-commit run --all-files --show-diff-on-failure + +[testenv:type] +runner = uv-venv-lock-runner +description = run type checker via mypy +commands = + mypy {posargs:aprsd} + +[testenv:dev] +runner = uv-venv-lock-runner +description = dev environment +extras = + dev + tests + type +commands = + uv pip tree