Order-dependent test failures: custom_globals.lp mutates global Python evaluation environment (_shared_environment) and leaks across tests
I maintainer di solito rispondono entro 1 giorno
@VictosVertex ci sta già lavorando.
Dal 16/3/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Running the full test suite via nox -s test can produce order-dependent failures in tests that use Python operators like python("math.pow"). The root cause is that custom_globals.lp deliberately modifies the global/shared Python evaluation environment in constraint_handler.evaluator (specifically _shared_environment) and that change persists for the remainder of the pytest process.
Because the Python helper code used by @pythonEvalExpr / Python operators reads globals from constraint_handler.evaluator._shared_environment, mutating it in one test affects unrelated subsequent tests. This makes the suite sensitive to test order and can cause flaky failures.
Steps to reproduce
Run the full suite:
nox -s test
Observe that after custom_globals runs, a later test that relies on math being present in the Python environment may fail (e.g., a fixture using operation(python("math.pow"), ...)).
Related to #72
- Lingua principale
- Python
- Stelle
- 4
- Fork
- 0
- Merge medio
- 2g 9h
- PR unite (30g)
- 19
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di potassco/constraint-handler
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
potassco/constraint-handler#276 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
potassco/constraint-handler#216 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
constraint-handler 2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
potassco/constraint-handler#491 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Multiple definitions that agree with each otherForse già presa @AbdallahS l’ha presa 1 giorno fa. Apertaconstraint-handler 2
potassco/constraint-handler#490 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
potassco/constraint-handler#489 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di potassco/constraint-handler
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
521xueweihan/HelloGitHub#4729 ·
-
auto-reported bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
cliproxy-quota: a tab around a credential email skips own-accounts and paced-accounts matchingApertaneeds-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
pollen-robotics/reachy_mini_conversation_app#631 ·
I maintainer di solito rispondono entro 7 giorni
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100