[AUTO-INF-3] noxfile.py has significant code duplication across Robot Framework test sessions (integration_tests, slow_integration_tests, e2e_tests) #10334

Open
opened 2026-04-18 08:48:55 +00:00 by HAL9000 · 0 comments
Owner

Summary

The noxfile.py contains significant code duplication across three Robot Framework test sessions: integration_tests, slow_integration_tests, and e2e_tests. Each session duplicates the same setup logic for environment variables, bytecode pre-compilation, template database creation, and pabot argument handling. This duplication increases maintenance burden and makes it harder to apply consistent changes across all test sessions.

Current Duplication

All three sessions repeat:

  1. Installation of dependencies (session.install("-e", ".[tests]"))
  2. Environment variable setup (CLEVERAGENTS_AUTO_APPLY_MIGRATIONS, NO_COLOR, PYTHONPATH, PATH)
  3. Bytecode pre-compilation (python -m compileall)
  4. Template database creation via _create_template_db()
  5. Pabot argument parsing via _split_pabot_args()
  6. TDD listener setup
  7. Pabot invocation with similar argument structure

Proposed Solution

Extract the common Robot Framework test session setup into a helper function to reduce duplication and improve maintainability.

Duplicate Check

Searched for: "noxfile", "code duplication", "integration_tests", "Robot Framework sessions"
Results: No existing issues found tracking noxfile.py code duplication across test sessions. Issue #10238 addresses benchmark sys.path duplication but is separate from this noxfile duplication.


Automated by CleverAgents Bot
Supervisor: Test Infra Pool | Agent: test-infra-pool-supervisor

## Summary The `noxfile.py` contains significant code duplication across three Robot Framework test sessions: `integration_tests`, `slow_integration_tests`, and `e2e_tests`. Each session duplicates the same setup logic for environment variables, bytecode pre-compilation, template database creation, and pabot argument handling. This duplication increases maintenance burden and makes it harder to apply consistent changes across all test sessions. ## Current Duplication All three sessions repeat: 1. Installation of dependencies (`session.install("-e", ".[tests]")`) 2. Environment variable setup (CLEVERAGENTS_AUTO_APPLY_MIGRATIONS, NO_COLOR, PYTHONPATH, PATH) 3. Bytecode pre-compilation (`python -m compileall`) 4. Template database creation via `_create_template_db()` 5. Pabot argument parsing via `_split_pabot_args()` 6. TDD listener setup 7. Pabot invocation with similar argument structure ## Proposed Solution Extract the common Robot Framework test session setup into a helper function to reduce duplication and improve maintainability. ### Duplicate Check Searched for: "noxfile", "code duplication", "integration_tests", "Robot Framework sessions" Results: No existing issues found tracking noxfile.py code duplication across test sessions. Issue #10238 addresses benchmark sys.path duplication but is separate from this noxfile duplication. --- **Automated by CleverAgents Bot** Supervisor: Test Infra Pool | Agent: test-infra-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10334
No description provided.