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

Assignment #3 (Testing): README has unnecessary instruction #30

Open
Rita-Centeno opened this issue Nov 11, 2024 · 1 comment
Open

Assignment #3 (Testing): README has unnecessary instruction #30

Rita-Centeno opened this issue Nov 11, 2024 · 1 comment

Comments

@Rita-Centeno
Copy link

In the 3rd step of section "2- Fixtures" of the 3rd Assignment, it says to "modify your main function so that the cleaned DataFrame is always returned. That will allow you to compare it with the expected fixture".
As we will be testing each function (load_data, clean_data and save_data) individually, it does not make sense to be testing the main function as well. This means that there is no point in making main return the cleaned dataframe (the cleaned dataframe is already returned by the cleaned_data function).

@MrCordeiro
Copy link
Collaborator

MrCordeiro commented Nov 13, 2024

If you’re not testing the main function—especially if it’s public—you’re leaving a door open for potential issues. Inner functions could be swapped out, bugs could slip in, and you might not catch them.

Testing the main function acts as an integration test. It’s an important step and shouldn’t be skipped.

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

No branches or pull requests

2 participants