Skip to content

Use ert test resources#714

Merged
matsl merged 1 commit intomasterfrom
refactor-remove-test-dependency-on-test-helper-introduce-resources
Apr 25, 2025
Merged

Use ert test resources#714
matsl merged 1 commit intomasterfrom
refactor-remove-test-dependency-on-test-helper-introduce-resources

Conversation

@matsl
Copy link
Copy Markdown
Collaborator

@matsl matsl commented Apr 24, 2025

What

Remove dependency on test file for test data.

Why

Using a file use for testing as test data in test causes many odd test
failures when the file needs updates. That is bad. This replaces that
construct with ert test resources. That is a feature we have not been
using that we might want to explore further in the future.

Remove dependency on test file for test data.
@matsl matsl requested a review from rswgnu April 24, 2025 22:17
Copy link
Copy Markdown
Owner

@rswgnu rswgnu left a comment

Choose a reason for hiding this comment

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

I don’t really understand why there are so many files or how this improves things but if you think it is important, I’ll defer to you on this.

@matsl
Copy link
Copy Markdown
Collaborator Author

matsl commented Apr 25, 2025

I don’t really understand why there are so many files or how this improves things but if you think it is important, I’ll defer to you on this.

The number of files comes from that each test file has its own resource folder. That is some kind of duplication now but it is the default for ert-resources so good to start out like that. The files are small.

The improvement is that hy-test-helper.el is now not used as test data anymore. This means changes to that file will not break tests. We can edit it without thinking about if a new line will make a test break. It is better to have test data separated from the files actually used for running the tests.

@matsl matsl merged commit 3f13371 into master Apr 25, 2025
4 checks passed
@matsl matsl deleted the refactor-remove-test-dependency-on-test-helper-introduce-resources branch June 24, 2025 07:20
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