Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vanpipy
Copy link
Collaborator

@vanpipy vanpipy commented Feb 23, 2024

No description provided.

@vanpipy vanpipy force-pushed the feature/refactor-test-utils branch from 5a19d4d to 8a3b8bd Compare February 23, 2024 08:38
3. Create a test case `test_init`, and some test fixtures can be used, `temp_repo`, `named_temp_repo` etc.
* `temp_repo` is module scoped fixture which create a temporary directory and available in the test suite `test_git_alias.py`.
* `named_temp_repo` is just same as `temp_repo` except the custom directory renaming.
4. Loop the third step until the 100% coverage of the function of the `git-alias`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Loop the third step until the 100% coverage of the function of the `git-alias`
4. Loop the third step until the 100% coverage of the function of the `git-alias`

Could we have a way to measure it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the coverage of the unit test is a good way to measure it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pytest coverage will be update in another PR.

tests/README.md Outdated

For example,

1. The `git-alias` should has a test suite, so create `test_git_alias.py` in the directory `test`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. The `git-alias` should has a test suite, so create `test_git_alias.py` in the directory `test`
1. The `git-alias` should have a test suite, so create `test_git_alias.py` in the directory `test`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be, update later.

Copy link
Collaborator Author

@vanpipy vanpipy Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update

tests/helper.py Outdated
try:
self._git_repo.git.remote("add", "origin", origin_url)
except GitCommandError:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should log the error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log is better but the throw is not expected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants