Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem committed Aug 28, 2020
1 parent 25c1c4a commit 685947b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions scripts/check-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dir_name="$(basename "${src_dir}")"
python_name="$(echo "${dir_name}" | sed -e 's/-//' | sed -e 's/-/_/g')"
python_files=(
"${src_dir}/${python_name}"/*.py
"${src_dir}"/tests/*.py
"${src_dir}/setup.py"
)

Expand Down
11 changes: 5 additions & 6 deletions tests/test_arguments.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Tests for HermesApp arguments."""
# pylint: disable=no-member
import argparse
import pytest
import sys

from rhasspyhermes_app import HermesApp

Expand All @@ -12,7 +11,7 @@ def test_default_arguments(mocker):

assert app.args.host == "localhost"
assert app.args.port == 1883
assert app.args.tls == False
assert app.args.tls is False
assert app.args.username is None
assert app.args.password is None

Expand All @@ -38,7 +37,7 @@ def test_arguments_from_cli(mocker):

assert app.args.host == "rhasspy.home"
assert app.args.port == 8883
assert app.args.tls == True
assert app.args.tls is True
assert app.args.username == "rhasspy-hermes-app"
assert app.args.password == "test"

Expand All @@ -57,7 +56,7 @@ def test_arguments_in_init(mocker):

assert app.args.host == "rhasspy.home"
assert app.args.port == 8883
assert app.args.tls == True
assert app.args.tls is True
assert app.args.username == "rhasspy-hermes-app"
assert app.args.password == "test"

Expand Down Expand Up @@ -133,4 +132,4 @@ def test_if_cli_arguments_overwrite_init_arguments_with_argument_parser(mocker):
assert app.args.username == "rhasspy-hermes-app"
assert app.args.password == "test"
assert app.args.test_argument == "foobar"
assert app.args.test_flag == True
assert app.args.test_flag is True
4 changes: 2 additions & 2 deletions tests/test_hotword.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

from rhasspyhermes_app import HermesApp

HOTWORD_TOPIC = f"hermes/hotword/test/detected"
HOTWORD_TOPIC = "hermes/hotword/test/detected"
HOTWORD = HotwordDetected("test_model")
HOTWORD_TOPIC2 = f"hermes/hotword/test2/detected"
HOTWORD_TOPIC2 = "hermes/hotword/test2/detected"
HOTWORD2 = HotwordDetected("test_model2")

_LOOP = asyncio.get_event_loop()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from rhasspyhermes_app import HermesApp

INR_TOPIC = f"hermes/nlu/intentNotRecognized"
INR_TOPIC = "hermes/nlu/intentNotRecognized"
INR = NluIntentNotRecognized(input="covfefe")

_LOOP = asyncio.get_event_loop()
Expand Down

0 comments on commit 685947b

Please sign in to comment.