Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[netjsonconfig-tests] Avoid error logging to print noisy output during tests #150

Closed
nemesifier opened this issue Apr 11, 2020 · 6 comments · Fixed by #176
Closed

[netjsonconfig-tests] Avoid error logging to print noisy output during tests #150

nemesifier opened this issue Apr 11, 2020 · 6 comments · Fixed by #176
Labels
enhancement good-first-issue Issues suited for training of new contributors Hacktoberfest Easy issues for attracting Hacktoberfest participants.

Comments

@nemesifier
Copy link
Member

nemesifier commented Apr 11, 2020

Depends on openwisp/openwisp-utils#98.

Use the decorators mentioned in the issue linked above to silence the output of noisy tests.

@nemesifier nemesifier added this to To do (general) in OpenWISP Contributor's Board via automation Apr 11, 2020
@nemesifier nemesifier added this to To do in Hacktoberfest 2020 via automation Apr 15, 2020
@nemesifier nemesifier moved this from To do (general) to To do (Python & Django) in OpenWISP Contributor's Board Aug 25, 2020
@atb00ker atb00ker added good-first-issue Issues suited for training of new contributors Hacktoberfest Easy issues for attracting Hacktoberfest participants. labels Sep 23, 2020
@atb00ker atb00ker moved this from To do to Python | Django in Hacktoberfest 2020 Sep 23, 2020
@nemesifier nemesifier added this to Backlog in OpenWISP Priorities for next releases via automation Nov 10, 2020
@lehone-hp
Copy link
Contributor

Hello,
when I run the tests, I get the following output

....................................................................................................................................................................................................................................................................................................Unrecognized config block was skipped:

{
    "unrecognized": true
}


.....................................................
----------------------------------------------------------------------
Ran 345 tests in 10.715s

OK

Please how can I know the exact test that runs and generates the output, Unrecognized config block was skipped for example like an additional parameter that I can append to the ./runtests.py

lehone-hp added a commit to lehone-hp/netjsonconfig that referenced this issue Jan 3, 2021
…g tests openwisp#150

Applied `capture_stdout` decorator on noisy tests

Fixes openwisp#150
@2001asjad
Copy link

@lehone-hp I wanted to ask how exactly did you come to know that what file in the tests folder we have to use the decorators in ?

@lehone-hp
Copy link
Contributor

@lehone-hp I wanted to ask how exactly did you come to know that what file in the tests folder we have to use the decorators in ?

I ran the tests with the -v flag; ./runtests.py -v, it lists all the tests methods as they run.

@2001asjad
Copy link

@lehone-hp I wanted to ask how exactly did you come to know that what file in the tests folder we have to use the decorators in ?

I ran the tests with the -v flag; ./runtests.py -v, it lists all the tests methods as they run.

@lehone-hp but when I run ./runtests.py -v command for solving issue https://github.com/openwisp/openwisp-controller/issues/187 to know which test methods are giving noisy outputs I get this error :

Screenshot from 2021-01-09 11-45-35
Can you help me out in this ?
./runtests.py shows this :

8Jansecond

Thank You

@lehone-hp
Copy link
Contributor

@2001asjad try, python runtests.py -v 2

@2001asjad
Copy link

@2001asjad try, python runtests.py -v 2

It works thank you so very much @lehone-hp 😊

OpenWISP Contributor's Board automation moved this from To do (Python & Django) to Done Jan 11, 2021
OpenWISP Priorities for next releases automation moved this from Backlog to Done Jan 11, 2021
nemesifier pushed a commit that referenced this issue Jan 11, 2021
Applied `capture_stdout` decorator on noisy tests.

Closes #150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good-first-issue Issues suited for training of new contributors Hacktoberfest Easy issues for attracting Hacktoberfest participants.
Projects
Hacktoberfest 2020
  
Python | Django
Development

Successfully merging a pull request may close this issue.

4 participants