Skip to content

chore(test): rename the Portuguese identifiers to English - #98

Merged
JeanExtreme002 merged 1 commit into
mainfrom
chore/english-identifiers
Sep 8, 2026
Merged

chore(test): rename the Portuguese identifiers to English#98
JeanExtreme002 merged 1 commit into
mainfrom
chore/english-identifiers

Conversation

@JeanExtreme002

Copy link
Copy Markdown
Owner

Copilot flagged four Portuguese variable names in #96. These are the rest — 13
identifiers in tests/mcp_server/test_parsing.py, from the coverage-partition
test, written while the session was being conducted in Portuguese.

OMITIDOS_DE_PROPOSITO DELIBERATELY_UNMEASURED
_mede _measures
_classificar _classify
caminho path
arquivos sources
ambos / nenhum both / neither
inesperados / esperado unexpected / expected
nativo native

How they were found

Not by grepping words I remembered. An AST sweep collected every identifier in
the project, diffed against the tree as it stood before this work began, which
left 820 new names to review. Thirteen were Portuguese, all in one file.

Comments, docstrings and the non-Python files (.md, .yml, .toml, the
coverage configs) came back clean. The only accented text in the project
is deliberate test data — "olá", "óólá", "café", "héllo", "ção"
chosen precisely because character count and byte count differ there, which is
what those tests are about.

One thing the rename exposed

caminhopath collided with a loop variable already called path, which
held a Path while the renamed one held a str. The glob variable is now
found. That confusion predated the rename; having the two in different
languages had been hiding it.

Verification

The renamed tests still catch their mutants — dropping mcp/* from the
library omit still fails test_no_file_is_measured_by_both_jobs. 702 MCP
tests, 91.3% coverage, mypy and flake8 clean.

`OMITIDOS_DE_PROPOSITO`, `_mede`, `_classificar`, `caminho`, `arquivos`,
`ambos`, `nenhum`, `inesperados`, `esperado`, `nativo` — Portuguese names in
an all-English codebase, from writing these tests while conversing in
Portuguese. Copilot caught the ones in the open PR; these are the rest.

Found by an AST sweep rather than by grepping words I remembered: every
identifier in the project, diffed against the tree before this work started,
which left 820 new names to review. Thirteen were Portuguese, all in this
file. Comments, docstrings, and the non-Python files came back clean — the
only accented text in the project is deliberate test data (`"olá"`, `"óólá"`,
`"café"`), chosen because character count and byte count differ there.

`caminho` → `path` collided with a loop variable already named `path` that
held a `Path` while the renamed one held a `str`, so the glob variable is now
`found`. That confusion predates the rename; it was just invisible while the
two had different-language names.

Verified the renamed tests still catch their mutants: dropping `mcp/*` from
the library omit still fails `test_no_file_is_measured_by_both_jobs`.
@github-actions github-actions Bot added the tests Test changes (tests/) label Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.92%. Comparing base (f6d2084) to head (63ddac8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   89.89%   89.92%   +0.02%     
==========================================
  Files          41       41              
  Lines        3632     3632              
==========================================
+ Hits         3265     3266       +1     
+ Misses        367      366       -1     
Flag Coverage Δ
Linux-py3.10 64.94% <ø> (ø)
Linux-py3.11 64.98% <ø> (+0.04%) ⬆️
Linux-py3.12 64.94% <ø> (ø)
Linux-py3.13 64.94% <ø> (ø)
Windows-py3.10 66.51% <ø> (ø)
Windows-py3.11 66.51% <ø> (ø)
Windows-py3.12 66.51% <ø> (ø)
Windows-py3.13 66.51% <ø> (ø)
macOS-py3.12 87.22% <ø> (ø)
mcp-Linux-py3.12 91.42% <ø> (ø)
mcp-Windows-py3.12 91.63% <ø> (ø)
mcp-macOS-py3.12 91.52% <ø> (ø)
speed-Linux-py3.12 66.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JeanExtreme002
JeanExtreme002 merged commit 23422f9 into main Sep 8, 2026
19 checks passed
@github-actions
github-actions Bot deleted the chore/english-identifiers branch September 8, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Test changes (tests/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant