Use static environment assert_template_result input values #1641
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.
As part of #1621, we want tests for the liquid language itself, things that aren't liquid implementation specific. However, in practice we use the static environment for input even though
assert_template_result
is using the non-static environment that is shared with the counters. As such, this is neither testing behaviour which we see in practice, nor behaviour that we should need to preserve in a reimplementation of liquid, so I've changedassert_template_result
to pass input values in the static environment.Similarly, I've updated the increment/decrement tests to not depend on the ability to pass in initial values for these counters. I've also updated them to actually test the reading of the variables, which is observable behaviour.