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

Fixed wrong Exception Inheritance #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Swanand01
Copy link

No description provided.

@multimeric multimeric self-requested a review May 16, 2021 12:55
Copy link
Owner

@multimeric multimeric left a comment

Choose a reason for hiding this comment

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

Add a test for this please.

@Swanand01
Copy link
Author

Hi @multimeric, I'm actually new to the open source community and Github in general.
I haven't created any tests yet, so it would be great if you could actually guide me and tell me what exactly is to be done.
Thanks.

@multimeric multimeric linked an issue May 16, 2021 that may be closed by this pull request
@multimeric
Copy link
Owner

To test that this has fixed the issue in question (#54), you need to recreate a situation where PandasSchema throws an error, and then assert that the error's class is no longer a subclass of BaseException. Ideally you will also test the downstream implication of this: namely that it can be caught by except Exception.

PandasSchema uses Python's built-in unittest module for testing. You can learn about that if you aren't familiar with it. In this case, you will probably need to create a new test_exceptions.py file since this test doesn't fit into any of the existing test categories. In that file you will create a new class with a new test function that performs the assertion described above. When in doubt, follow what the other tests have done.

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.

Wrong Exception inheritance
2 participants