Skip to content
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

test: refactor tests for system exit #40

Merged
merged 1 commit into from
May 15, 2024

Conversation

aj3sh
Copy link
Member

@aj3sh aj3sh commented May 13, 2024

Description

In our tests, we are currently mocking sys.exit. Due to this mocking, the application logic does not exit immediately in the tests, resulting in many errors failing. Therefore, this issue is being addressed through this PR by removing the mock and checking for the SystemExit exception to be raised.

Related Issue

N/A

Type of Change

Please mark the appropriate option below to describe the type of change your pull request introduces:

  • Bug fix
  • New feature
  • Enhancement
  • Documentation update
  • Refactor
  • Other (Tests)

Checklist

  • My pull request has a clear title and description.
  • I have used semantic commit messages.
    Examples: "fix: Fixed foobar bug", "feat(accounts): Added foobar feature".
  • I have added/updated the necessary documentation on README.md.
  • I have added appropriate test cases (if applicable) to ensure the changes are functioning correctly.

Additional Notes

[Add any additional notes or context that you think the reviewers should know about.]

By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.

Copy link
Collaborator

@golesuman golesuman left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Collaborator

@subashcs subashcs left a comment

Choose a reason for hiding this comment

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

Looks Good

@subashcs subashcs merged commit 491da60 into opensource-nepal:main May 15, 2024
3 checks passed
@aj3sh aj3sh deleted the test-refactor branch July 18, 2024 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants