Skip to content

fix: resolve deprecation warnings, typo, and xpassed tests#1037

Open
reachsridhard wants to merge 1 commit intotaverntesting:masterfrom
reachsridhard:fix/misc-issues
Open

fix: resolve deprecation warnings, typo, and xpassed tests#1037
reachsridhard wants to merge 1 commit intotaverntesting:masterfrom
reachsridhard:fix/misc-issues

Conversation

@reachsridhard
Copy link
Copy Markdown
Contributor

@reachsridhard reachsridhard commented May 5, 2026

gh pr create --title "fix: resolve deprecation warnings, typo, and xpassed tests" --body-file - <<'EOF'

Summary

This PR addresses three minor issues in the codebase: Python 3.13+ deprecation warnings, a typo in documentation, and tests marked as xfail that are now passing.

Changes Made

1. Fix Python 3.13+ Deprecation Warnings (tests/unit/test_marks.py)

  • Issue: ast.Dict.init deprecated the ctx parameter in Python 3.13+
  • Fix: Removed ctx=ast.Load() from 4 ast.Dict() constructor calls
  • Lines changed: 156, 170, 179, 190

2. Fix Typo in MQTT Client (tavern/_plugins/mqtt/client.py)

  • Issue: Docstring contained typo "faull" instead of "full"
  • Fix: Corrected to "If the queue is full trigger an error in main thread somehow"
  • Line: 300

3. Fix xpassed Tests (tests/unit/test_helpers.py)

  • Issue: TestPykwalifyExtension class was marked with @pytest.mark.xfail but tests are now passing
  • Fix: Removed @pytest.mark.xfail decorator
  • Line: 275

Testing

  • All modified tests pass successfully
  • No new warnings introduced

Checklist

  • Tests pass locally
  • No breaking changes
  • Minimal, focused changes
    EOF

Summary by CodeRabbit

Release Notes

  • Tests

    • Re-enabled schema validation test cases that were previously skipped.
    • Updated test code to align with current testing framework expectations.
  • Documentation

    • Fixed typo in inline code comment.

- Remove deprecated ctx=ast.Load() from ast.Dict() calls in test_marks.py (Python 3.13+)
- Fix typo 'faull' -> 'full' in MQTT client docstring
- Remove @pytest.mark.xfail from TestPykwalifyExtension (tests now passing)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5eb1ff19-af97-469d-86a0-220ecbaa541b

📥 Commits

Reviewing files that changed from the base of the PR and between 704d30f and ac89a67.

📒 Files selected for processing (3)
  • tavern/_plugins/mqtt/client.py
  • tests/unit/test_helpers.py
  • tests/unit/test_marks.py
💤 Files with no reviewable changes (1)
  • tests/unit/test_helpers.py

📝 Walkthrough

Walkthrough

This PR contains three independent maintenance updates: a typo correction in an MQTT client TODO comment, removal of an xfail marker from pykwalify validation tests, and removal of deprecated ctx arguments from ast.Dict constructor calls in unit tests.

Changes

Maintenance and Test Updates

Layer / File(s) Summary
Docstring Correction
tavern/_plugins/mqtt/client.py
Corrected typo in inline TODO docstring: "faull" → "full" regarding message queue capacity behaviour.
Test Suite Updates
tests/unit/test_helpers.py, tests/unit/test_marks.py
Removed @pytest.mark.xfail decorator from TestPykwalifyExtension; updated ast.Dict constructor calls throughout test_dict_node to omit deprecated ctx=ast.Load() argument.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: fixing deprecation warnings, a typo, and xpassed tests across three files.
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 unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

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