Skip to content

[TEMP] Skip camera_handler_test.py#408

Merged
Mikefly123 merged 1 commit into
mainfrom
skip-cam-test-temp
May 25, 2026
Merged

[TEMP] Skip camera_handler_test.py#408
Mikefly123 merged 1 commit into
mainfrom
skip-cam-test-temp

Conversation

@Mikefly123
Copy link
Copy Markdown
Contributor

We are temporarily skipping the camera handler test in main due to the need to displace the camera from the CI environment.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Camera integration test has been marked to skip execution in the CI environment.

Walkthrough

The integration test test_01_take_image in the camera handler test suite is now marked with @pytest.mark.skip to prevent execution in CI environments lacking camera hardware. The skip decorator includes a clarifying reason string.

Changes

Camera Test Skip Configuration

Layer / File(s) Summary
Camera hardware test skip
PROVESFlightControllerReference/test/int/camera_handler_test.py
The test_01_take_image test is decorated with @pytest.mark.skip to skip execution in CI where camera hardware is unavailable.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

📷 A camera test tried to take flight,
But CI had no lens in sight.
With a skip mark applied with grace,
It waits for hardware time and place. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides context for the change but lacks detailed testing information and other template sections required by the repository. Add more details about testing approach, related issues, and complete the checklist items to align with the repository's PR description template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly indicates a temporary skip of camera_handler_test.py, which matches the main change in the pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@PROVESFlightControllerReference/test/int/camera_handler_test.py`:
- Line 28: Replace the unconditional skip on test_01_take_image with a CI-only
conditional skip: import os in the test module and replace
`@pytest.mark.skip`(...) on test_01_take_image with
`@pytest.mark.skipif`(os.getenv("CI") == "true", reason="No camera available in
CI"), so the test still runs locally when a camera is present; ensure the
decorator references the test function name test_01_take_image and remove the
original pytest.mark.skip import or usage if no longer needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9a02251e-241f-4352-96d9-c5200fb21293

📥 Commits

Reviewing files that changed from the base of the PR and between 9bb0602 and 343a303.

📒 Files selected for processing (1)
  • PROVESFlightControllerReference/test/int/camera_handler_test.py

time.sleep(5) # Wait for the camera to power on


@pytest.mark.skip(reason="Temporary Skip Due to Lack of Camera in CI Environment")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify current skip patterns and CI-gated skipping conventions in integration tests.
rg -n -C2 'pytest\.mark\.(skip|skipif)\('
rg -n -C2 'os\.getenv\("CI"\)|os\.environ\["CI"\]|CI\s*==' PROVESFlightControllerReference/test/int

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 3062


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="PROVESFlightControllerReference/test/int/camera_handler_test.py"
echo "=== $FILE (first 120 lines) ==="
nl -ba "$FILE" | head -n 120

echo
echo "=== Search for CI env usage across test/int ==="
rg -n --hidden --no-ignore -S '(os\.getenv\(["'\"'"]CI["'\"'"]\)|os\.environ\["'\"'"]CI["'\"'"]|CI\s*==|CI\s*!=|env\.get\(["'\"'"]CI["'\"'"])' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for pytest.mark.skipif with CI in test/int ==="
rg -n -S 'pytest\.mark\.skipif\([^\)]*CI' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for other CI-gating conventions in repository ==="
rg -n -S 'pytest\.mark\.skipif\([^\)]*CI' . || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 245


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="PROVESFlightControllerReference/test/int/camera_handler_test.py"
echo "=== $FILE (first 120 lines) ==="
nl -ba "$FILE" | head -n 120

echo
echo "=== Search for CI env usage across test/int ==="
rg -n --hidden --no-ignore -S '(os\.getenv\(["'\''"]CI["'\''"]\)|os\.environ\["'\''"]CI["'\''"]|CI\s*==|CI\s*!=|env\.get\(["'\''"]CI["'\''"])' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for pytest.mark.skipif with CI in test/int ==="
rg -n -S 'pytest\.mark\.skipif\([^\)]*CI' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for other CI-gating conventions in repository ==="
rg -n -S 'pytest\.mark\.skipif\([^\)]*CI' . || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 245


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="PROVESFlightControllerReference/test/int/camera_handler_test.py"
echo "=== $FILE (lines 1-120 with numbers) ==="
if command -v cat >/dev/null 2>&1; then
  cat -n "$FILE" | head -n 120
else
  echo "cat not available"
fi

echo
echo "=== Search for CI env usage across test/int ==="
rg -n --hidden --no-ignore -S '(os\.getenv\(["'\''"]CI["'\''"]\)|os\.environ\["'\''"]CI["'\''"]|env\.get\(["'\''"]CI["'\''"]\)|\bCI\s*(==|!=)' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for pytest.mark.skipif that references CI (anywhere) ==="
rg -n -S 'pytest\.mark\.skipif\([^)]*CI' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for any hardware-missing / camera-missing conditionals ==="
rg -n -S '(camera|CAMERA).*(skipif|skip|CI|env|hardware|not set|missing)' PROVESFlightControllerReference/test/int || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 2105


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== camera_handler_test.py (tail) ==="
FILE="PROVESFlightControllerReference/test/int/camera_handler_test.py"
tail -n 60 "$FILE" || true
echo

echo "=== CI env usage in PROVESFlightControllerReference/test/int ==="
rg -n -S 'os\.getenv\(["'\'']CI["'\'']\)|os\.environ\["'\'']CI["'\'']\]|os\.environ\.get\(["'\'']CI["'\'']\)|env\.get\(["'\'']CI["'\'']\)|\bCI\b\s*([!=]=|is\s*|equals)|GITHUB_ACTIONS' "$FILE" PROVESFlightControllerReference/test/int || true
echo

echo "=== CI env usage across repo (limit to python) ==="
rg -n --glob='*.py' -S 'os\.getenv\(["'\'']CI["'\'']\)|os\.environ\["'\'']CI["'\'']\]|os\.environ\.get\(["'\'']CI["'\'']\)|env\.get\(["'\'']CI["'\'']\)|GITHUB_ACTIONS' . || true
echo

echo "=== pytest.mark.skipif patterns containing CI keyword across repo ==="
rg -n --glob='*.py' -S 'pytest\.mark\.skipif\([^\n]*CI|pytest\.mark\.skipif\([^\)]*CI' . || true
echo

echo "=== Any existing helper variable/fixture for CI skipping ==="
rg -n --glob='*.py' -S 'IS_CI|RUNNING_IN_CI|CI_SKIP|skip_if_ci|skipif.*(ci)' . || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 1650


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for this test file name in repo ==="
rg -n --hidden --no-ignore --glob='*.yml' --glob='*.yaml' --glob='*.sh' --glob='*.py' 'camera_handler_test\.py' . || true

echo
echo "=== Search for pytest invocation for test/int in workflows/scripts ==="
rg -n --hidden --no-ignore --glob='*.yml' --glob='*.yaml' --glob='*.sh' --glob='*.py' '(pytest.*test/int|pytest.*PROVESFlightControllerReference/test/int|test/int.*pytest)' . || true

echo
echo "=== List any CI/workflow configs ==="
ls -R .github 2>/dev/null || true

echo
echo "=== Search for pytest.mark.skipif usage (any env var) in test/int ==="
rg -n -S 'pytest\.mark\.skipif\(([^)]*)' PROVESFlightControllerReference/test/int || true

echo
echo "=== Search for fixtures/markers that gate hardware/CI in test/int ==="
rg -n -S 'marker|hardware|CI|running in|integration.*skip|skipif' PROVESFlightControllerReference/test/int || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 1817


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== .github/workflows/ci.yaml (first 200 lines) ==="
sed -n '1,200p' .github/workflows/ci.yaml

echo
echo "=== Search ci.yaml for pytest invocation ==="
rg -n --hidden --no-ignore -S 'pytest|test/int|PROVESFlightControllerReference/test/int|integration' .github/workflows/ci.yaml || true

echo
echo "=== Search ci.yaml for CI env var usage/setting ==="
rg -n -S 'CI\s*:|CI=' .github/workflows/ci.yaml || true

echo
echo "=== Search ci.yaml for env blocks ==="
rg -n -S 'env:' .github/workflows/ci.yaml || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 6722


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== .github/workflows/ci.yaml (lines 200-330) ==="
sed -n '200,330p' .github/workflows/ci.yaml

echo
echo "=== Search for make test-integration / pytest flags in Makefile(s) ==="
rg -n --hidden --no-ignore --glob='*Makefile*' 'test-integration|gds-integration|pytest|PYTEST' . || true

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 6513


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Makefile: lines 200-320 ==="
sed -n '200,320p' Makefile

echo
echo "=== Makefile: lines 320-380 ==="
sed -n '320,380p' Makefile

Repository: Open-Source-Space-Foundation/proves-core-reference

Length of output: 8079


Scope the camera test skip to CI only instead of disabling it everywhere.

The test is currently unconditionally skipped via @pytest.mark.skip(...), which prevents test_01_take_image from running in non-CI environments too (where a camera might be present).

`@pytest.mark.skip`(reason="Temporary Skip Due to Lack of Camera in CI Environment")
Suggested change
+import os
 import pytest
@@
-@pytest.mark.skip(reason="Temporary Skip Due to Lack of Camera in CI Environment")
+@pytest.mark.skipif(
+    os.getenv("CI") == "true",
+    reason="Temporary skip in CI due to lack of camera hardware",
+)
 def test_01_take_image(fprime_test_api: IntegrationTestAPI, start_gds):
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@PROVESFlightControllerReference/test/int/camera_handler_test.py` at line 28,
Replace the unconditional skip on test_01_take_image with a CI-only conditional
skip: import os in the test module and replace `@pytest.mark.skip`(...) on
test_01_take_image with `@pytest.mark.skipif`(os.getenv("CI") == "true",
reason="No camera available in CI"), so the test still runs locally when a
camera is present; ensure the decorator references the test function name
test_01_take_image and remove the original pytest.mark.skip import or usage if
no longer needed.

@Mikefly123 Mikefly123 merged commit ae1e09e into main May 25, 2026
6 checks passed
@Mikefly123 Mikefly123 deleted the skip-cam-test-temp branch May 25, 2026 23:31
@github-project-automation github-project-automation Bot moved this to Done in V1.X.X May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants