Skip to content

Check the flags byte for FNAME in test_compress_infile_out_file_no_name - #301

Merged
rhpvorderman merged 1 commit into
pycompression:developfrom
ptweezy:test-no-name-flag-byte
Oct 28, 2026
Merged

rhpvorderman merged 1 commit into
pycompression:developfrom
ptweezy:test-no-name-flag-byte

Conversation

@ptweezy

@ptweezy ptweezy commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

The test checks output[4] & gzip.FNAME, but byte 4 is the first byte of MTIME, and the next line already checks that MTIME is 0. So that check can't fail. The flags are in byte 3.

To test the fix, I made -n keep the file name in the header. The test passes on develop and fails with this PR.

This PR changes only tests, so it has no CHANGELOG entry.

Checklist

  • Pull request details were added to CHANGELOG.rst
  • Documentation was updated (if needed)

The test checked byte 4, the first byte of MTIME. The flags are in byte 3.
@rhpvorderman

Copy link
Copy Markdown
Collaborator

Ah. Such an unfortunate mistake. Thanks!

@rhpvorderman
rhpvorderman merged commit e757d5b into pycompression:develop Oct 28, 2026
22 checks passed
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.

2 participants