fix tox runs
This commit is contained in:
parent
41b7c27a63
commit
c18823cf88
|
@ -3,6 +3,7 @@ import unittest
|
|||
|
||||
from aprsd_slack_plugin import location_plugin
|
||||
|
||||
|
||||
if sys.version_info >= (3, 2):
|
||||
from unittest import mock
|
||||
else:
|
||||
|
@ -10,7 +11,7 @@ else:
|
|||
|
||||
|
||||
class TestPlugin(unittest.TestCase):
|
||||
@mock.patch.object(location_plugin.SlackLocationPlugin, "command")
|
||||
@mock.patch.object(location_plugin.SlackLocationPlugin, "filter")
|
||||
def test_plugin(self, mock_command):
|
||||
mock_command.return_value = ""
|
||||
|
||||
|
@ -19,4 +20,5 @@ class TestPlugin(unittest.TestCase):
|
|||
}
|
||||
|
||||
p = location_plugin.SlackLocationPlugin(config)
|
||||
p.command("KM6LYW", "location", 1)
|
||||
packet = {"from": "WB4BOR", "message_text": "location"}
|
||||
p.filter(packet)
|
||||
|
|
12
tox.ini
12
tox.ini
|
@ -32,7 +32,7 @@ isolated_build = true
|
|||
[testenv]
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
commands =
|
||||
# Use -bb to enable BytesWarnings as error to catch str/bytes misuse.
|
||||
# Use -Werror to treat warnings as errors.
|
||||
|
@ -42,14 +42,14 @@ commands =
|
|||
skip_install = true
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
commands =
|
||||
mypy src tests
|
||||
|
||||
[testenv:lint]
|
||||
skip_install = true
|
||||
deps =
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
commands =
|
||||
flake8 aprsd_slack_plugin tests
|
||||
|
||||
|
@ -57,7 +57,7 @@ commands =
|
|||
skip_install = true
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
changedir = {toxinidir}/docs
|
||||
commands =
|
||||
{envpython} clean_docs.py
|
||||
|
@ -67,7 +67,7 @@ commands =
|
|||
[testenv:fmt]
|
||||
skip_install = true
|
||||
deps =
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
commands =
|
||||
isort aprsd_slack_plugin tests
|
||||
black aprsd_slack_plugin tests
|
||||
|
@ -75,7 +75,7 @@ commands =
|
|||
[testenv:fmt-check]
|
||||
skip_install = true
|
||||
deps =
|
||||
-r{toxinidir}/dev-requirements.txt
|
||||
-r{toxinidir}/requirements-dev.txt
|
||||
commands =
|
||||
isort --check-only aprsd_slack_plugin tests
|
||||
black --check aprsd_slack_plugin tests
|
||||
|
|
Loading…
Reference in New Issue