Fixes #194. Some tests fail due to different cultures.#195
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Concern: Process-global state mutation in parallel tests
Suggested fix: Replace all three constructors with a single <PropertyGroup>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>This:
If invariant globalization is too broad (e.g., some tests intentionally verify locale behavior), an alternative is a shared xUnit |
Add AssemblyFixture and unit tests for pt-PT culture.
|
If I run 'dotnet jb cleanupcode Terminal.Gui.Editor.slnx --profile="TG.Editor Full Cleanup"' locally and commit the result will result in 55 files changed besides getting a build errors because of the lack of "#nullable" and related warnings. This is a normal behavior? I don't know what to do because it touches other files than what I really changed. |
|
You should only use clean up on files you touched. The files forked from AvaloniaEdit should not be modified. |
tig
left a comment
There was a problem hiding this comment.
Reviewed the updated implementation (AssemblyFixture + pt-PT regression tests).
The approach is sound:
- \InvariantCultureAssemblyFixture\ via [assembly: AssemblyFixture]\ sets the default culture once per test run — much better than per-class constructors.
- The pt-PT tests correctly use thread-local \CultureInfo.CurrentCulture\ overrides with save/restore in \inally, which takes precedence over the assembly-level default.
- All 60 integration tests pass.
One minor note: my earlier suggestion of <InvariantGlobalization>true\ would break the pt-PT tests (the runtime disallows non-invariant \CultureInfo\ instantiation), so the \AssemblyFixture\ pattern is the right call here.
LGTM ✅
|
I noticed that the echo is showing incomplete command and the complete command is: dotnet jb cleanupcode Terminal.Gui.Editor.slnx \
--profile="TG.Editor Full Cleanup" \
--no-build \
--exclude="third_party/**/*;src/Terminal.Gui.Editor/Document/**/*;src/Terminal.Gui.Editor/Utils/**/*;src/Terminal.Gui.Editor/Search/**/*" \
|| true
if ! git diff --exit-code; then
echo "::error::ReSharper code cleanup found style drift. Run 'dotnet jb cleanupcode Terminal.Gui.Editor.slnx --profile=\"TG.Editor Full Cleanup\"' locally and commit the result."
exit 1
fi |
|
Thanks. See #200 |
Fixes #194