mirror of
https://github.com/craigerl/aprsd.git
synced 2026-01-19 12:05:36 -05:00
updated tox.ini
This commit is contained in:
parent
f95c1a8d46
commit
ce9fc3757d
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
24
tox.ini
24
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user