← Back to team overview

nagios-charmers team mailing list archive

Re: [Merge] ~xavpaice/hw-health-charm:fix_tests into hw-health-charm:master

 

Review: Needs Fixing

Hey, some inline comments

Diff comments:

> diff --git a/Makefile b/Makefile
> index d1043f4..89cd0ce 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -21,7 +21,7 @@ help:
>  
>  lint:
>  	@echo "Running flake8"
> -	@flake8 --max-line-length=80 ./src
> +	@flake8 --max-line-length=120 ./src
>  

I'm getting an error, "make: flake8: Command not found"

Maybe could use tox to pull in deps:

-       @flake8 --max-line-length=120 ./src
+       @cd src && tox -e pep8

And for tox

diff --git a/src/tox.ini b/src/tox.ini
index 491fbe6..d4b8e94 100644
--- a/src/tox.ini
+++ b/src/tox.ini
@@ -17,5 +17,5 @@ commands =
 basepython = python3
 deps =
   flake8
-commands = flake8 {posargs} --max-complexity=20 --max-line-length=120 reactive files unit_tests
+commands = flake8 {posargs} --max-complexity=20 --max-line-length=120 reactive files tests

>  test: unittest lint
>  
> diff --git a/src/tests/unit/test_actions.py b/src/tests/unit/test_actions.py
> index aadca73..84b375c 100644
> --- a/src/tests/unit/test_actions.py
> +++ b/src/tests/unit/test_actions.py
> @@ -15,7 +15,7 @@
>  import unittest
>  import unittest.mock as mock
>  
> -from actions.actions import clear_sel
> +from actions.actions import clear_sel  # noqa: E402

Is this noqa actually required? E402 is about imports which aren't at the top of a module, but here the import actually is

>  
>  
>  class ClearSelTestCase(unittest.TestCase):


-- 
https://code.launchpad.net/~xavpaice/hw-health-charm/+git/hw-health-charm/+merge/363758
Your team Nagios Charm developers is subscribed to branch hw-health-charm:master.


References