Files
cleveragents-core/robot/scientific_paper_basic.robot
T
freemo b122ec7ed5
CI / lint (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 51s
CI / typecheck (pull_request) Successful in 1m0s
CI / security (pull_request) Successful in 55s
CI / build (pull_request) Successful in 25s
CI / helm (pull_request) Successful in 32s
CI / push-validation (pull_request) Successful in 26s
CI / e2e_tests (pull_request) Successful in 3m38s
CI / integration_tests (pull_request) Successful in 6m42s
CI / unit_tests (pull_request) Successful in 8m19s
CI / docker (pull_request) Successful in 13s
CI / coverage (pull_request) Successful in 15m23s
CI / status-check (pull_request) Successful in 2s
fix(test-infra): remove redundant ${PYTHON} variable definitions from robot files
Remove the local ${PYTHON}    python (and python3) variable definitions from
the *** Variables *** sections of all affected robot files. These local
definitions were overriding the pabot-injected venv Python path passed via
--variable PYTHON:/path/to/venv/python, causing tests to use the system
Python (which lacks required packages like structlog, sqlalchemy, etc.)
instead of the nox venv Python.

The correct ${PYTHON} value is already set by Setup Test Environment in
common.resource via sys.executable, and pabot passes it via --variable.
The local fallback definitions are redundant and harmful in parallel runs.

Audit found 56 robot files with the pattern (more than the 9 originally
identified in the issue). All occurrences have been removed.

ISSUES CLOSED: #1309
2026-04-14 14:50:55 +00:00

84 lines
2.9 KiB
Plaintext

*** Settings ***
Library Process
Library OperatingSystem
Library String
Resource ${CURDIR}/v2_paths.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${CONFIG_FILE} ${CURDIR}/../examples/scientific_paper_writer.yaml
${CONTEXT_DIR} ${TEMPDIR}/paper_basic_contexts
${CONTEXT_NAME} ${EMPTY}
${TEST_ID} ${EMPTY}
*** Test Cases ***
Scientific Paper Writer Basic Integration Test
[Documentation] Minimal integration test to verify scientific paper writer works with real APIs
[Tags] integration code_blocks
[Timeout] 2 minutes
# Test 1: Basic intro response (uses OpenAI API)
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${CONFIG_FILE}
... --context ${CONTEXT_NAME}
... --context-dir ${CONTEXT_DIR}
... --unsafe
... --allow-rxpy-in-run-mode
... test-actor Hello
... stderr=DEVNULL
... timeout=120s on_timeout=kill
Should Contain ${result.stdout} Paper Writer
Log Intro test passed
# Test 2: Command handler (no API needed)
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${CONFIG_FILE}
... --context ${CONTEXT_NAME}
... --context-dir ${CONTEXT_DIR}
... --unsafe
... --allow-rxpy-in-run-mode
... test-actor !help
... stderr=DEVNULL
... timeout=120s on_timeout=kill
Should Contain ${result.stdout} Available Commands
Log Command handler test passed
# Test 3: Echo test to verify framework works
${result}= Run Process ${PYTHON} -m cleveragents actor run
... -c ${V2_CONFIG_DIR}/simple_echo_config.yaml
... --unsafe
... --allow-rxpy-in-run-mode
... test-actor Test message
... stderr=DEVNULL
... timeout=120s on_timeout=kill
Should Contain ${result.stdout} Test message
Log Echo test passed
Log All integration tests passed successfully
*** Keywords ***
Setup Test Environment
${timestamp}= Get Time epoch
Set Suite Variable ${TEST_ID} ${timestamp}
Set Suite Variable ${CONTEXT_NAME} test_paper_simple_${TEST_ID}
Set Suite Variable ${CONTEXT_DIR} ${TEMPDIR}/paper_basic_contexts
Create Directory ${CONTEXT_DIR}
Log Test environment setup complete with ID: ${TEST_ID}
Cleanup Test Environment
Run Keyword If '${CONTEXT_DIR}' != '${EMPTY}' Remove Directory ${CONTEXT_DIR} recursive=True
Log Test environment cleaned up
Should Contain Any
[Arguments] ${text} @{patterns}
FOR ${pattern} IN @{patterns}
${status}= Run Keyword And Return Status Should Contain ${text} ${pattern}
IF ${status} RETURN
END
Fail Text does not contain any of: @{patterns}