-
Notifications
You must be signed in to change notification settings - Fork 11
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
Only align if data section size contains files #112
Conversation
if you're unsure, add a test that rebuilds and compares every pak to make sure everything passes |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
+ Coverage 73.94% 73.95% +0.01%
==========================================
Files 61 61
Lines 3116 3118 +2
==========================================
+ Hits 2304 2306 +2
Misses 812 812 ☔ View full report in Codecov by Sentry. |
I don't even know if dread has empty packages but I |
tests/formats/test_pkg.py
Outdated
parse_and_build_compare( | ||
Pkg.construct_class(Game.DREAD), Game.DREAD, dread_path.joinpath("packs/system/system.pkg") | ||
) | ||
pkg_files = [f for f in dread_path.rglob("*.pkg")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preferable for having the list of files in the code, and then parametrizing the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add test for SR files. If any file fails the test for SR, mark it as expected failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dread has 47 files and SR has 368 files.
For SR it is quite easy: As we never figured out how to rebuilt the pkgs, every test will fail except the empty pkgs. I can create a PR for my funny code which can parse + rebuild all files except 11 from SR if you like but it doesn't make sense in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno if you really want me to explicitly write down all these files but I did it now how it is done for most other tests with the following + parametrizing the test:
all_dread_pkg = [name for name in dread_data.all_name_to_asset_id().keys()
if name.endswith(".pkg")]
Added a test for SR but skipped for now because the already mentioned reason.
Addresses #108
Is it different for dread? In SR there exists some empty
BLA_discardables.pkg
. If they have no files in the data section, they also have no 128 byte alignment after the header.