-
Notifications
You must be signed in to change notification settings - Fork 8
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
Include tests to the python program that can be executed by github workflow #7
Comments
I'll look at this, it will help with #5 as well, under https://github.com/Stedders/AutomateGitRepoSetup/tree/Stedders. |
Great, thanks. Please issue a PR per major change you are making. |
Hey @funbeedev I've gone through and reverted the changes to the main file, it is difficult to unit test the code but I have committed a change that shows how it could be done. On the latest commit of my branch I have added a test folder with a pytest script, this excutes the main I would strongly recommend refactoring the code with the following changes...
As it stands I won't create the PR as the code fails flake8 linting ( |
@Stedders Thanks, I'll review your changes and suggestions and get back to you soon. |
@Stedders
Is this just for more flexibility? How do you suggest the path of the config file be passed in?
Do you just mean to load the config within a function instead?
I assume this relates to your point 2 and is about avoid use of global variables. I agree this aspect of the code needs to be improved! I'll create an issue for this. |
I would recommend that we add a param
Yes, there are a couple of options...
I would prefer the latter, as it allows for more granular testing - for example
👍 it feels like the better way of doing it. |
@Stedders Those are all great suggestions, thank you! I've made issues based on your suggestions and they will be addressed soon. |
@funbeedev - I'm happy to hold on the unit testing, in addition I can pick up any other little bits you need help with (either coding or reviewing). |
Current Behaviour
Execution of the python program in the github workflow will fail.
Changes Requested
Include tests in the python program.
Setup workflow to execute these tests.
The text was updated successfully, but these errors were encountered: