These are chat archives for coala/coala-bears

4th
Feb 2019
Amol Grover
@frextrite
Feb 04 04:40
@jayvdb Updated coala/coala-bears#2850
John Vandenberg
@jayvdb
Feb 04 06:02
@frextrite, great, looks like we should be green now
John Vandenberg
@jayvdb
Feb 04 06:08
@frextrite I've assigned coala/coala-bears#2853 to you for your next challenge ;-)
John Vandenberg
@jayvdb
Feb 04 06:15
https://travis-ci.org/coala/coala-bears/pull_requests should now be yellow for a long time.
Amol Grover
@frextrite
Feb 04 06:21
@jayvdb How'd you know I love challenges? Will take a look ;)
Sladyn
@sladyn98
Feb 04 07:25
@Naveenaidu @frextrite looks like the same pycodestyle error needs to be fixed in the corobo repository<>
Sladyn
@sladyn98
Feb 04 07:44
Ill create an issue asap
Naveen Naidu
@Naveenaidu
Feb 04 15:19
Need help with testing a bear locally.
  1. How do we test the working of a bear. Whenever i run pytest, it always exits with a coverage of 43% or so. Do i always have to push it to Github to get the test coverage.
  2. Suppose I want to run a test only for JinjaBear. How do i do it. Do i cd into the tests/jinja2 and run pytest there?
Bhushan Khanale
@bkhanale
Feb 04 15:29
  1. See the CI log
  2. You can provide test file with pytest to run only that file
Naveen Naidu
@Naveenaidu
Feb 04 15:30
  1. Is there any way to run it locally instead of pushing it to Travis?
Bhushan Khanale
@bkhanale
Feb 04 15:30
Yeah, you should be able to run it locally
Naveen Naidu
@Naveenaidu
Feb 04 15:31
It's not working :/, It always exits with a coverage of 43% locally, NOTE: It passes 100% in CI
Bhushan Khanale
@bkhanale
Feb 04 15:34
We must be skipping files out of coverage, check the log to know the pre-requisites for pytest coverage
Naveen Naidu
@Naveenaidu
Feb 04 15:40
Thanks for the help, but i found the answer to my question :) , We can run specific tests by using pytest -k <your-test>
Bhushan Khanale
@bkhanale
Feb 04 15:41
Yeah, and you can specify the test file too for running all tests in a file
But that has nothing to do with the coverage, it is if you want to run only specific tests
Sladyn
@sladyn98
Feb 04 15:56
home/travis/build/sladyn98/corobo/answers/__init__.py' [ 28] ·································;238;238;238;01m··························\(' **** PycodestyleBear (W605) [Section: all.autopep8 | Severity: NORMAL] **** ! ! W605 invalid escape sequence '\('
@Naveenaidu How am i supposed to interpret this :(
Naveen Naidu
@Naveenaidu
Feb 04 15:57
Adding an extra blackslash should solve it. \\(
Is that inside a comment though?
Sladyn
@sladyn98
Feb 04 15:58
init.py is empty my friend :((((
Sladyn
@sladyn98
Feb 04 16:23
There are no line numbers here.Strangely the files where the error occurs keep changing
Naveen Naidu
@Naveenaidu
Feb 04 16:40

init.py is empty my friend :((((

Opps! My bad I didn't see that the file name was __init__.py

Sladyn
@sladyn98
Feb 04 16:45
Exactly
Pycodestyle bear is complaining for wierd stuff
There are no line numbers just this
look at this, lines 1253
Naveen Naidu
@Naveenaidu
Feb 04 17:06
If I'm not wrong, the error is in file isolated_testcase.py
Sladyn
@sladyn98
Feb 04 17:07
But in that file there is no '\'
Naveen Naidu
@Naveenaidu
Feb 04 17:08
Yeah Just checked the file now. That's a really weird and interesting error.
Sladyn
@sladyn98
Feb 04 17:09
Yeah the bear is complaining for files where there isint any '\'
Naveen Naidu
@Naveenaidu
Feb 04 17:09
I'll look around and see if I can find anything related to it.
Sladyn
@sladyn98
Feb 04 17:09
Or as we seen even empty files
morever there is not line number as we seen in the case of your issue
Sladyn
@sladyn98
Feb 04 17:15
This was thrown by the PEP8 bear and not pycodestyle
Naveen Naidu
@Naveenaidu
Feb 04 18:00
@jayvdb Please review coala/coala-bears#2803 when you are free. Asciinema added to show it's working. The test have 100% coverage. Travis is failing because of Netlify Build error due to documentation error. Can someone please help me out with it.
Sladyn
@sladyn98
Feb 04 18:41
Yeah sure I could be of some use hopefully ..
Naveen Naidu
@Naveenaidu
Feb 04 18:41
Thanks :D