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

[orders] support reaction-specific item traits #1906

Merged
merged 7 commits into from
Aug 17, 2021

Conversation

myk002
Copy link
Member

@myk002 myk002 commented Jul 19, 2021

implemented for both import and export

uses the new test wrapper functionality to export current orders, run the test, clear orders, import the player's previous orders, and remove temp files. this prevents the tests from having visible side effects. The tests will reset the next order id, but this isn't visible to the player.

end

function check_import_success(file_content)
function check_import_success(file_content, comment, num_expected_orders)
Copy link
Member

Choose a reason for hiding this comment

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

Minor thing: comment is unused. If it makes sense to include in failure messages, I suggest passing it through as the comment argument to the two expect.eq calls below to provide more context (or you could take the approach of check_import_fail() and create fancier error messages). Alternatively, the comment argument could be removed, given that test failure tracebacks should be enough to isolate the cause of the failure now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Passed comment through to the expect.eq calls, which was my original intention. The full tracebacks have definitely superseded comments for identifying which test failed, but I still find comments useful for reminding myself what the heck I'm actually testing if it's not completely obvious.

@lethosor lethosor merged commit 6b83a39 into DFHack:develop Aug 17, 2021
@myk002 myk002 deleted the myk_orders_reactions branch August 17, 2021 04:35
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