Skip to content

test: make test_util more Python 3 friendly #32710

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

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jul 4, 2020

This uses io.open to allow test_util to open with the encoding and
newline handling across python 2 and python 3. With this change, the
test suite failures are within the single digits locally.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

compnerd commented Jul 4, 2020

CC: @tachoknight @drexin @CodaFi @ahoppen

@compnerd
Copy link
Member Author

compnerd commented Jul 4, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jul 4, 2020

Build failed
Swift Test Linux Platform
Git Sha - 3f71647b9349c1709e53d6c0858e10bbd5b72bc1

@swift-ci
Copy link
Contributor

swift-ci commented Jul 4, 2020

Build failed
Swift Test OS X Platform
Git Sha - 3f71647b9349c1709e53d6c0858e10bbd5b72bc1

@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2020

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2020

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2020

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Jul 6, 2020

Build failed
Swift Test OS X Platform
Git Sha - c8188e55abd698f3716f27d7eee470c55898f1bd

@swift-ci
Copy link
Contributor

swift-ci commented Jul 6, 2020

Build failed
Swift Test Linux Platform
Git Sha - c8188e55abd698f3716f27d7eee470c55898f1bd

compnerd added 2 commits July 7, 2020 15:18
This uses `io.open` to allow `test_util` to open with the encoding and
newline handling across python 2 and python 3.  With this change, the
test suite failures are within the single digits locally.
This is required to ensure that we encode the strings correctly when
redirected.  This allows the printing to succeed where it would fail
previously due to encoding failures.
@compnerd
Copy link
Member Author

compnerd commented Jul 7, 2020

@swift-ci please test

Copy link
Contributor

@drexin drexin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@swift-ci
Copy link
Contributor

swift-ci commented Jul 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - dcd33ca

Appease the python linter
@compnerd
Copy link
Member Author

compnerd commented Jul 8, 2020

@swift-ci please python lint

@compnerd
Copy link
Member Author

compnerd commented Jul 8, 2020

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jul 8, 2020

@swift-ci please test windows platform

@compnerd compnerd merged commit a54aeb2 into swiftlang:master Jul 9, 2020
@compnerd compnerd deleted the 3-is-neigh branch July 9, 2020 00:01
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.

3 participants