Fix the failure of TestInputSocket.py when extra lines are found.#1392
Merged
bcoconni merged 1 commit intoJSBSim-Team:masterfrom Feb 15, 2026
Merged
Fix the failure of TestInputSocket.py when extra lines are found.#1392bcoconni merged 1 commit intoJSBSim-Team:masterfrom
TestInputSocket.py when extra lines are found.#1392bcoconni merged 1 commit intoJSBSim-Team:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1392 +/- ##
=======================================
Coverage 25.29% 25.29%
=======================================
Files 169 169
Lines 18570 18570
=======================================
Hits 4697 4697
Misses 13873 13873 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TestInputSocket.py when extra lines are detected.TestInputSocket.py when extra lines are found.
Member
Author
|
The bug has been inadvertently demonstrated by the PR #1393. |
Contributor
|
Looks good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I had several occurrences in a row where the Ubuntu builds of the CI workflow are failing with the following error (note the empty string at the start of one list):
I am not sure why Ubuntu is triggering this error while other platforms do not. And previously it was occurring seldomly while it is now happening systematically on the Ubuntu runners. This may be linked to the fact that CRLF are used in the help string while our Python code is splitting the lines using
split("\n"):jsbsim/src/input_output/FGInputSocket.cpp
Lines 255 to 264 in 3003423
jsbsim/tests/TestInputSocket.py
Lines 205 to 213 in 3003423
This PR is replacing all occurrences of
.split("\n")by.splitlines(). The latter handles correctly the various ends of lines (\n,\r\n, etc.). Following this change, the error stopped to occur on my fork.