Skip to content

fix test_install errors - #1032

Open
tsteven4 wants to merge 5 commits into
miurahr:masterfrom
tsteven4:test_install_py7zr113_fix
Open

fix test_install errors#1032
tsteven4 wants to merge 5 commits into
miurahr:masterfrom
tsteven4:test_install_py7zr113_fix

Conversation

@tsteven4

Copy link
Copy Markdown
Contributor

related to py7zr 1.1.3 and
WARNING : Caught Bad7zFile, terminating installer workers
ERROR : Specified path is bad: .

These errors compromised our ability to mock archives that use extract_target such as those for qtpdf and qtwebengine extensions.

This should fix "Check tox tests" workflow.

related to py7zr 1.1.3 and
WARNING : Caught Bad7zFile, terminating installer workers
ERROR   : Specified path is bad: .

These errors compromised our ability to mock archives that
use extract_target such as those for qtpdf and qtwebengine extensions.
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7c8b7068-128a-4ec1-98c8-ce9ade0f1ffb

📥 Commits

Reviewing files that changed from the base of the PR and between 76b9eed and 5118986.

📒 Files selected for processing (1)
  • tests/test_install.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/test_install.py

Walkthrough

tests/test_install.py updates mocked archive creation for extract_target to write members from a temporary working directory, and adds a test comment about using --keep for debugging created mock archives.

Changes

Mock archive extraction path update

Layer / File(s) Summary
Pushd helper and archive writing
tests/test_install.py
A pushd() context manager is added, and MockArchive.write_compressed_archive() uses it to write extract_target archives from "." with arcname=None; a nearby comment notes --keep for debugging mock archives.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • miurahr/aqtinstall#1017 — Also changes tests/test_install.py archive-mocking behavior and how archive members are written during mock creation.

Suggested reviewers: miurahr

Poem

A rabbit hopped through temp-dir light,
And shaped the mock archives just right.
With --keep as a clue,
The tests now brew through,
And land where the members fit tight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main test-install fix in this PR.
Description check ✅ Passed The description is directly related to the py7zr and extract_target test failures addressed here.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tsteven4
tsteven4 marked this pull request as draft June 30, 2026 01:23
@tsteven4
tsteven4 marked this pull request as ready for review July 1, 2026 12:54
@tsteven4

tsteven4 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Here is the difference in the created archives. You can see the extraneous directory entry
2026-07-01 07:16:07 D.... 0 0 .
is no longer in the archive.

(aqttest-venv-3142) tsteven4@PEDALDAMNIT:~/work/aqtinstall$ 7z l ref/qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z

7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20
 64-bit locale=C.UTF-8 Threads:20 OPEN_MAX:10240

Scanning the drive for archives:
1 file, 227 bytes (1 KiB)

Listing archive: ref/qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z

--
Path = ref/qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z
Type = 7z
Physical Size = 227
Headers Size = 203
Method = LZMA2:24 BCJ
Solid = -
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2026-07-01 07:16:07 D....            0            0  .
2026-07-01 07:16:07 D....            0            0  bin
2026-07-01 07:16:07 D....            0            0  lib
2026-07-01 07:16:07 ....A           20           24  lib/Qt6WebEngineCore.prl
2026-07-01 07:16:07 D....            0            0  mkspecs
------------------- ----- ------------ ------------  ------------------------
2026-07-01 07:16:07                 20           24  1 files, 4 folders
(aqttest-venv-3142) tsteven4@PEDALDAMNIT:~/work/aqtinstall$ 7z l dut/qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z

7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20
 64-bit locale=C.UTF-8 Threads:20 OPEN_MAX:10240

Scanning the drive for archives:
1 file, 221 bytes (1 KiB)

Listing archive: dut/qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z

--
Path = dut/qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z
Type = 7z
Physical Size = 221
Headers Size = 197
Method = LZMA2:24 BCJ
Solid = -
Blocks = 1

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2026-07-01 07:15:20 D....            0            0  bin
2026-07-01 07:15:20 D....            0            0  lib
2026-07-01 07:15:20 ....A           20           24  lib/Qt6WebEngineCore.prl
2026-07-01 07:15:20 D....            0            0  mkspecs
------------------- ----- ------------ ------------  ------------------------
2026-07-01 07:15:20                 20           24  1 files, 3 folders

Comment thread tests/test_install.py Outdated
Comment on lines +1170 to +1171
( # extensions availability: qtpdf and qtwebengine
# add --keep to debug created mock archive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe this is not that awkward?

Suggested change
( # extensions availability: qtpdf and qtwebengine
# add --keep to debug created mock archive
(
# extensions availability: qtpdf and qtwebengine
# add --keep to debug created mock archive

@tsteven4

tsteven4 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

I note the new mock archive structure better matches the Qt archive we are mocking which doesn't have a '.' Directory:

 7z l 6.8.1-0-202411221529qtwebengine-Windows-Windows_11_23H2-MSVC2022-Windows-Windows_11_23H2-X86_64.7z | grep ' D'
   Date      Time    Attr         Size   Compressed  Name
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineWidgets/6.8.1/QtWebEngineWidgets/private
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineQuick/6.8.1/QtWebEngineQuick/private
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineCore/6.8.1/QtWebEngineCore/private
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineWidgets/6.8.1/QtWebEngineWidgets
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineQuick/6.8.1/QtWebEngineQuick
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineCore/6.8.1/QtWebEngineCore
2024-11-21 01:28:46 D....            0            0  lib/cmake/Qt6BuildInternals/StandaloneTests
2024-11-21 01:28:59 D....            0            0  lib/cmake/Qt6WebEngineQuickDelegatesQml
2024-11-22 04:44:31 D....            0            0  qml/QtWebEngine/ControlsDelegates
2024-11-21 01:28:46 D....            0            0  translations/qtwebengine_locales
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineWidgets/6.8.1
2024-11-21 01:29:00 D....            0            0  lib/cmake/Qt6WebEngineCoreTools
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineQuick/6.8.1
2024-11-21 01:28:59 D....            0            0  lib/cmake/Qt6WebEngineWidgets
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineCore/6.8.1
2024-11-21 01:28:59 D....            0            0  lib/cmake/Qt6WebEngineQuick
2024-11-22 04:44:31 D....            0            0  lib/cmake/Qt6Qml/QmlPlugins
2024-11-21 01:28:46 D....            0            0  lib/cmake/Qt6BuildInternals
2024-11-21 01:28:48 D....            0            0  lib/cmake/Qt6WebEngineCore
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineWidgets
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineQuick
2024-11-21 01:28:46 D....            0            0  include/QtWebEngineCore
2024-11-21 01:28:59 D....            0            0  lib/cmake/Qt6Designer
2024-11-22 04:44:31 D....            0            0  plugins/designer
2024-11-21 01:28:46 D....            0            0  lib/cmake/Qt6Qml
2024-11-22 04:44:31 D....            0            0  qml/QtWebEngine
2024-11-22 04:44:31 D....            0            0  mkspecs/modules
2024-11-21 01:28:46 D....            0            0  lib/cmake/Qt6
2024-11-21 01:28:46 D....            0            0  translations
2024-11-21 01:28:46 D....            0            0  resources
2024-11-22 04:44:31 D....            0            0  metatypes
2024-11-22 04:44:31 D....            0            0  lib/cmake
2024-11-22 04:44:31 D....            0            0  plugins
2024-11-22 04:44:31 D....            0            0  modules
2024-11-21 01:28:46 D....            0            0  mkspecs
2024-11-22 04:44:31 D....            0            0  include
2024-11-21 01:29:04 D....            0            0  sbom
2024-11-22 04:44:31 D....            0            0  qml
2024-11-22 04:44:31 D....            0            0  lib
2024-11-22 04:44:31 D....            0            0  bin

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.

3 participants