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

Stop using assert_template_result in some tests depending on language extension #1622

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

dylanahsmith
Copy link
Contributor

For #1621

Tests for liquid extensions (e.g. custom drops, tags or filters) would depend on the library API and should probably be distinguished from language tests so they don't get converted to YAML tests. Perhaps they shouldn't use those decoupled test helpers like assert_template_result or assert_match_syntax_error to make it easier to separate those tests when we are ready to rewrite them in YAML.

As such, I've written a PR as a sample of this sort of change, before make this change more broadly.

The assert_template_result test helper is a pretty thin abstraction, so using the library API can actually make the test a bit clearer to those familiar with that API, even though it is a bit more verbose.

An alternative would be to move all these tests to different test files, perhaps in a different directory. However, I think it does make sense for these tests to stay in the test/integration/ folder (since they are integration tests for this library) and it seems like these changes would be easier to review than moving tests between files.

@dylanahsmith dylanahsmith merged commit ff1c35b into master Sep 14, 2022
@dylanahsmith dylanahsmith deleted the stop-using-assert-template-result-for-lang-ext branch September 14, 2022 21:03
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