Skip to content

fix(python): restore time import in udp interface tests - #4152

Merged
ryanmelt merged 1 commit into
mainfrom
fix/udp-test-time-import
Oct 26, 2026
Merged

ryanmelt merged 1 commit into
mainfrom
fix/udp-test-time-import

Conversation

@ryanmelt

@ryanmelt ryanmelt commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

What changed

Restores import time in openc3/python/test/interfaces/test_udp_interface.py.

Why it changed

main has failed Python unit tests since #3902 merged (c8eb390d3). Two tests fail with NameError: name 'time' is not defined:

  • test_queues_datagrams_as_fast_as_they_arrive
  • test_limits_how_many_bytes_are_queued

e5a6b85 went into main on its own and removed the import, which was unused there at the time. The #3902 branch never got that commit, and it added tests that use time. The merge applied cleanly but left those tests without the import. Any PR whose CI runs against current main hits the same failure, PR #3948 for example.

Testing strategy

uv run pytest test/interfaces/test_udp_interface.py: 25 passed. ruff check is clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added a time-related import to the UDP interface tests; no test behavior changed.

e5a6b85 removed the then-unused import on main, while #3902 added read
queue tests that use it. The merge was textually clean but left main's
Python unit tests failing with NameError.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e3376c03-00ff-4795-b349-a9e2ebdda04d
Commits

Reviewing files that changed from the base of the PR and between c8eb390 and b7ddf89.

Files selected for processing: 1
  • openc3/python/test/interfaces/test_udp_interface.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

The UDP interface test file adds an import for Python’s time module. No test behavior or implementation logic changed.

Changes: UDP interface test import

Layer / File(s) Summary
UDP test time import
openc3/python/test/interfaces/test_udp_interface.py
The test file imports Python’s time module.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Possibly related PRs

Suggested labels: python, testing

Suggested reviewers: jmthomas

Merge Risk: Minimal · up to b7ddf

This test-only change has no identified merge-blocking risk.

Architecture risk: Low · up to b7ddf

The change affects 1 system.

Changed systems: openc3

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — openc3 (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in openc3/python/test/interfaces/test_udp_interface.py: Added the time import.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: restoring the missing time import in the UDP interface tests.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.25%. Comparing base (c8eb390) to head (b7ddf89).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4152      +/-   ##
==========================================
- Coverage   81.17%   80.25%   -0.92%     
==========================================
  Files         691      909     +218     
  Lines       45253    70551   +25298     
  Branches     2688     2741      +53     
==========================================
+ Hits        36733    56623   +19890     
- Misses       7843    13252    +5409     
+ Partials      677      676       -1     
Flag Coverage Δ
frontend 68.43% <ø> (+0.01%) ⬆️
python 78.70% <ø> (-17.41%) ⬇️
ruby-api 83.55% <ø> (+0.23%) ⬆️
ruby-backend 86.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ryanmelt
ryanmelt merged commit d2ed704 into main Oct 26, 2026
50 of 52 checks passed
@ryanmelt
ryanmelt deleted the fix/udp-test-time-import branch October 26, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant