-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix errors on Windows tests in new tests/functional #4767
Conversation
Tests didn't fail. Also not failing on main now. |
90ee216
to
88e7626
Compare
88e7626
to
6f90cc3
Compare
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.
One small request to document why we're doing this for future us. Could also be worth starting a README with the reasons we do unexpected things.
core/dbt/tests/fixtures/project.py
Outdated
with open(path.join(name), "w", encoding="utf-8") as fp: | ||
fp.write(data) |
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.
It looks like this is happening in multiple places. I don't want to lose why we're doing it this way (in 6 months). Could we pull it out to centralize this and add a comment as to why we do this?
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.
Excellent idea, and much more readable. Have created 'read_file' and 'write_file' functions.
# We need to explicitly use encoding="utf-8" because otherwise on | ||
# Windows we'll get codepage 1252 and things might break |
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.
🎉
resolves #4781
Fixing test failures in tests/functional/basic on Windows platforms.
Description
Instead of generic 'write' methods, use text write methods with utf-8 encoding.
Checklist
CHANGELOG.md
and added information about my change