Skip to content

Remove redundant and brittle tests - #4

Merged
han-xudong merged 1 commit into
mainfrom
test/cleanup-test-suite
Jul 30, 2026
Merged

Remove redundant and brittle tests#4
han-xudong merged 1 commit into
mainfrom
test/cleanup-test-suite

Conversation

@han-xudong

@han-xudong han-xudong commented Jul 30, 2026

Copy link
Copy Markdown
Member

This removes tests that duplicated runtime coverage or locked repository configuration, workflow layout, fixed versions, and reader-facing text. Behavioral coverage for the Python API, native bindings, packaging artifacts, release tooling, and security boundaries remains.

Validation:

  • pixi run check
  • 163 passed, 2 platform-specific skips
  • affected suites re-run: 64 passed

Summary by CodeRabbit

  • Tests

    • Updated legacy streaming coverage to verify timing behavior without checking console output.
    • Improved source distribution checks for generated cache artifacts and reproducibility.
    • Updated release metadata validation coverage.
  • Chores

    • Removed obsolete quality, wheel configuration, and native type-checking tests and helpers.
    • Removed an unused MyPy configuration file.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Tests are simplified across legacy streaming, packaging, release metadata, wheel configuration, and native type-checking. Several workflow and runtime validation modules are removed, while remaining tests use dynamic release metadata and updated generated-cache fixtures.

Changes

Test validation updates

Layer / File(s) Summary
Streaming and packaging test updates
tests/python/test_legacy.py, tests/quality/test_sdist.py
Legacy streaming tests now assert timing behavior without stdout capture, and sdist pollution fixtures use generated-cache artifacts.
Release metadata validation
tests/release/test_metadata.py
Release metadata validation derives the version from pyproject.toml and checks tags, release dates, changelog notes, and alternate-tag errors.
Quality and native check removal
tests/quality/test_quality_configuration.py, tests/quality/test_wheel_configuration.py, tests/typecheck/*, tests/typecheck/mypy.ini
Workflow, wheel configuration, native runtime, and type-checking validation coverage is removed or reduced, with obsolete helpers and imports deleted.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • netft/pyNetFT#8: Deletes the quality configuration tests covering macOS CI, workflows, and platform validation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing redundant and brittle tests.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/cleanup-test-suite

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

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/quality/test_sdist.py (1)

47-54: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Create an actual generated-cache directory if directory exclusion is being tested.

path.write_bytes() makes core/.pytest_cache/generated-cache a regular file, so this fixture does not cover a generated-cache directory or nested contents. Create the directory with a marker file and clean it up with directory-aware removal, or rename the fixture to reflect that it is intentionally testing a file.

🤖 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 `@tests/quality/test_sdist.py` around lines 47 - 54, Update the pollution
fixture in test_sdist.py so the core/.pytest_cache/generated-cache entry is
created as a directory containing a marker file, allowing directory exclusion
and nested contents to be tested. Adjust the fixture cleanup to remove
directories recursively while retaining file cleanup for the other pollution
entries.
🤖 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.

Outside diff comments:
In `@tests/quality/test_sdist.py`:
- Around line 47-54: Update the pollution fixture in test_sdist.py so the
core/.pytest_cache/generated-cache entry is created as a directory containing a
marker file, allowing directory exclusion and nested contents to be tested.
Adjust the fixture cleanup to remove directories recursively while retaining
file cleanup for the other pollution entries.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d923d04-3251-47ef-a6ae-94e12207cee1

📥 Commits

Reviewing files that changed from the base of the PR and between c7249d9 and a372a4f.

📒 Files selected for processing (9)
  • tests/python/test_legacy.py
  • tests/quality/test_quality_configuration.py
  • tests/quality/test_sdist.py
  • tests/quality/test_wheel_configuration.py
  • tests/release/test_metadata.py
  • tests/typecheck/mypy.ini
  • tests/typecheck/native_mutable.py
  • tests/typecheck/native_rejected.py
  • tests/typecheck/native_runtime.py
💤 Files with no reviewable changes (6)
  • tests/typecheck/native_mutable.py
  • tests/typecheck/native_runtime.py
  • tests/typecheck/mypy.ini
  • tests/typecheck/native_rejected.py
  • tests/quality/test_quality_configuration.py
  • tests/quality/test_wheel_configuration.py

@han-xudong
han-xudong merged commit 4b17ddd into main Jul 30, 2026
34 of 35 checks passed
@han-xudong
han-xudong deleted the test/cleanup-test-suite branch July 30, 2026 06:39
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