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

Add tests? #2

Closed
mgorny opened this issue Apr 7, 2024 · 4 comments · Fixed by #3
Closed

Add tests? #2

mgorny opened this issue Apr 7, 2024 · 4 comments · Fixed by #3

Comments

@mgorny
Copy link

mgorny commented Apr 7, 2024

Given that the standard library includes tests for the tarfile module, could we also have tests for this package?

@jaraco
Copy link
Owner

jaraco commented Apr 12, 2024

Yes, perhaps. That would involve porting another module and maintaining its synchronization here.

My initial instinct was that between CPython testing the code upstream on the latest Python and jaraco.context exercising the behavior downstream for older Pythons that it wouldn't add a lot of value to port the whole test suite for the module. This port does provide nominal tests (tests syntax and any doctests).

Can you tell me more about the value you'd derive from including the full test suite for the module?

@mgorny
Copy link
Author

mgorny commented Apr 13, 2024

Well, my idea is that if you're taking the module from newer CPython, then it may depend on newer API/behavior of other modules from newer CPython, and this wouldn't show unless you thoroughly tested the complete functionality.

@jaraco
Copy link
Owner

jaraco commented Apr 16, 2024

It was several hours of work, but it's done. Tests are now ported and validating the behavior. There was one bug uncovered by the effort (b572934). In retrospect, it would have been cheaper and easier to just let users discover the bug and report it or (more likely) let Python 3.8 sunset without anyone noticing. There's going to be more toil too when Python 3.13 comes out and the test harnesses and fixtures change again.

@mgorny
Copy link
Author

mgorny commented Apr 16, 2024

Thanks! I'm sorry to hear it was that much work, but also glad that it turned out that I was right.

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 a pull request may close this issue.

2 participants