add compresslevel to archive_util.make_tarball, fix test_archive_util - #418
Open
ds-cbo wants to merge 1 commit into
Open
add compresslevel to archive_util.make_tarball, fix test_archive_util#418ds-cbo wants to merge 1 commit into
ds-cbo wants to merge 1 commit into
Conversation
ds-cbo
commented
Jul 21, 2026
|
|
||
|
|
||
| class ArchiveUtilTestCase(support.TempdirManager): | ||
| class TestArchiveUtil(TestCase, support.TempdirManager): |
Author
There was a problem hiding this comment.
class name must start with Test for pytest to detect it as something that is testable, TestCase must be added for the default addCleanup function that patch is using
ds-cbo
commented
Jul 21, 2026
| def _make_tarball(self, tmpdir, target_name, suffix, **kwargs): | ||
| tmpdir2 = self.mkdtemp() | ||
| if same_drive(tmpdir, tmpdir2): | ||
| if not same_drive(tmpdir, tmpdir2): |
Author
There was a problem hiding this comment.
this looked like a logic error to me, it would skip every test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
title mostly speaks for itself, but as for the why: I notice that
build -sis taking a very long time and 90% of it is spent hugely optimizing the tarball as level 9 is the default, I would like to fine-tune that in setuptools, but first distutils needs to support passing it along totarfile.openwhile testing, I noticed that the entire
tets_archive_utilfile was ignored when runningpython3.14 -m pytest, which seemed to be fixed when prefixing the class with Test like any other class in the directory, presumably some leftover from a different testing framework