Skip to content

Instantly share code, notes, and snippets.

@sks444
Created May 19, 2018 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sks444/66c5d8e7704708fda50569fd3ce3a4db to your computer and use it in GitHub Desktop.
Save sks444/66c5d8e7704708fda50569fd3ce3a4db to your computer and use it in GitHub Desktop.
Q: Sorry for a silly question but, while working on an issue, once i find what the error is and fix it,how do i check if it works or not. For eg:- Once i find the fix for the issue coala/coala#5166 , how do i check if it works or not?
A: you have to run the tests and/or write new tests, running pytest will run all the tests, you can specify the test file using the pytest -k testFile
Q2: How do i make a test file? Can you direct me to any reference from where i can read. Are we supposed to write a test file for all the issue we fix?
A1: there is a test folder in the coala repo, that has tests for all the files
A2: go through coala docs. we have a tutorial on writing tests
Q: So, am i supposed to write test to check the issue coala/coala#5166?
A: you should first solve this issue and then you should add tests for the code you added
Q: But how would i know if the fix solved the issue?
A: you should test it locally
Q: Sorry, but how do i do that. Correct me if i am wrong:-I fix the issue in my forked repo .. then i run coala on any sample file?
A: if you change the code, in local repo and if you installed with the -e tag then ^^^ that should work
Q: so is the command "pip3 install coala -e"?
A: pip3 install -e path/To/ForkedRep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment