Skip to content

Commit d315e69

Browse files
net0wellclaude
andcommitted
test: permite LC_CTYPE no teste de ambiente limpo (AC-11)
No Linux o próprio Python define LC_CTYPE ao iniciar com locale C (PEP 538); a variável não vem do host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 087e276 commit d315e69

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/PythonScriptRunner.Core.Tests/Integration/IsolationTests.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def run(inputs, ctx):
142142

143143
var names = result.GetOutput<JsonArray>("nomes").Select(n => n!.GetValue<string>().ToUpperInvariant()).ToList();
144144
names.ShouldNotContain("PSR_TEST_HOST_ONLY");
145-
string[] allowed = ["PATH", "SYSTEMROOT", "TEMP", "TMP", "TMPDIR", "HOME"];
145+
// LC_CTYPE is set by the interpreter itself on Linux (PEP 538 locale coercion), not inherited from the host.
146+
string[] allowed = ["PATH", "SYSTEMROOT", "TEMP", "TMP", "TMPDIR", "HOME", "LC_CTYPE"];
146147
names.Where(n => !n.StartsWith("PSR_", StringComparison.Ordinal) && !allowed.Contains(n)).ShouldBeEmpty();
147148
}
148149

0 commit comments

Comments
 (0)