-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Use Gemini to set-up the basics of tests for our python cli #277
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
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
7f221be
feat: use gemini to write tests for python modules
justinbarclay 5469d92
chore: add test workflow
justinbarclay ce5cb0e
chore: update contributing on running tests
justinbarclay 774bd81
test: add test for cli
justinbarclay 44e0c74
test: add comprehensive tests for proc_stats module
justinbarclay 7e12f46
chore: Add debug prints and refine proc stats test
justinbarclay 1a1cfe3
refactor: Extract helper functions from parse_status
justinbarclay 4aa10be
refactor: tests to handle new structure in proc_stats
justinbarclay 20b01fe
chore: update gitignore pyc
justinbarclay 93b6228
fix: Refactor proc_stats module control flow to prevent UnboundLocalE…
justinbarclay bf1eb78
chore: fix potential divide by zero bug
justinbarclay 4a182d8
tests: enhance and expand the test coverage
justinbarclay 9e8a296
chore: fix bug where a timeout of 1 results in only running once
justinbarclay 502702d
clarify and add tests
justinbarclay 6f69186
fix: bug where module.exit_json doesn't return
justinbarclay 09c1548
fix: assign result after after successful calculation.
justinbarclay 30eea3d
test: Add test_main to verify main function setup with mocks
justinbarclay e42a9cd
fix: Correctly mock open context manager and assert call in test_main
justinbarclay 077d265
fix: workflow triggers
justinbarclay 6197cf4
chore: fix lints
justinbarclay fa0fb85
remove: pointless cli tests
justinbarclay a054956
chore: fix python flake integration
justinbarclay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: Python Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.8", "3.9", "3.10"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| cd ./unix | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install -r dev-requirements.txt | ||
| - name: Test with pytest | ||
| run: | | ||
| pytest | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| .DS_Store | ||
| .vscode/ | ||
| *.pyc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.