UAT: pytest, pytest-asyncio, and pytest-cov listed as dev dependencies in pyproject.toml — violates spec prohibition on pytest #3651

Open
opened 2026-04-05 21:06:37 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/remove-prohibited-pytest-dependencies
  • Commit Message: fix(deps): remove prohibited pytest dependencies and misleading coverage.py config from pyproject.toml
  • Milestone: (none — backlog)
  • Parent Epic: #1678

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

What Was Tested

Reviewed pyproject.toml optional dependencies section to verify compliance with the specification's prohibition on pytest.

Expected Behavior (from spec)

Per CONTRIBUTING.md, the use of xUnit-style testing frameworks, specifically pytest, is strictly prohibited for unit tests. The project uses Behave for unit tests and Robot Framework for integration tests. No pytest dependencies should be present in the project.

Actual Behavior

The [project.optional-dependencies] section in pyproject.toml lists three pytest packages in the dev extras:

[project.optional-dependencies]
dev = [
    # ...
    # Testing
    "behave==1.3.3",
    "pytest>=8.0.0",          # ← PROHIBITED
    "pytest-asyncio>=0.23.0", # ← PROHIBITED
    "pytest-cov>=4.1.0",      # ← PROHIBITED
    # ...
]

Additionally, pyproject.toml contains a [tool.coverage] configuration section (lines 172-198) which is the configuration format for coverage.py (used with pytest-cov), even though the project uses slipcover for coverage measurement (as configured in the coverage_report nox session).

Code Location

  • File: pyproject.toml, lines 65-68 (pytest dependencies in dev extras)
  • File: pyproject.toml, lines 172-198 ([tool.coverage] section for coverage.py)

Impact

  1. Installing .[dev] installs pytest, which is a prohibited framework
  2. The [tool.coverage] section is misleading — it configures coverage.py but the project uses slipcover
  3. Developers may accidentally use pytest for tests, violating the BDD-only mandate
  4. The presence of pytest in dependencies may cause confusion about the intended test framework

Steps to Reproduce

  1. Open pyproject.toml
  2. Look at [project.optional-dependencies]dev section
  3. Observe pytest>=8.0.0, pytest-asyncio>=0.23.0, pytest-cov>=4.1.0 listed
  4. Also observe [tool.coverage] section (coverage.py config) despite slipcover being used

Suggested Fix

  1. Remove pytest>=8.0.0, pytest-asyncio>=0.23.0, pytest-cov>=4.1.0 from the dev optional dependencies
  2. Remove or replace the [tool.coverage] section with a [tool.slipcover] section if needed, or remove it entirely since slipcover is configured via nox session arguments

Subtasks

  • Remove pytest>=8.0.0, pytest-asyncio>=0.23.0, and pytest-cov>=4.1.0 from [project.optional-dependencies]dev in pyproject.toml
  • Remove or replace the [tool.coverage] section in pyproject.toml (coverage.py config is misleading when slipcover is used)
  • Verify no other references to pytest remain in pyproject.toml or project configuration files
  • Run nox (all default sessions) and confirm all stages pass
  • Verify coverage ≥ 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • pytest, pytest-asyncio, and pytest-cov are absent from all dependency sections of pyproject.toml.
  • The [tool.coverage] section is removed or replaced with correct slipcover configuration.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/remove-prohibited-pytest-dependencies` - **Commit Message**: `fix(deps): remove prohibited pytest dependencies and misleading coverage.py config from pyproject.toml` - **Milestone**: *(none — backlog)* - **Parent Epic**: #1678 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## What Was Tested Reviewed `pyproject.toml` optional dependencies section to verify compliance with the specification's prohibition on pytest. ## Expected Behavior (from spec) Per CONTRIBUTING.md, the use of xUnit-style testing frameworks, specifically **pytest**, is strictly prohibited for unit tests. The project uses Behave for unit tests and Robot Framework for integration tests. No pytest dependencies should be present in the project. ## Actual Behavior The `[project.optional-dependencies]` section in `pyproject.toml` lists three pytest packages in the `dev` extras: ```toml [project.optional-dependencies] dev = [ # ... # Testing "behave==1.3.3", "pytest>=8.0.0", # ← PROHIBITED "pytest-asyncio>=0.23.0", # ← PROHIBITED "pytest-cov>=4.1.0", # ← PROHIBITED # ... ] ``` Additionally, `pyproject.toml` contains a `[tool.coverage]` configuration section (lines 172-198) which is the configuration format for `coverage.py` (used with pytest-cov), even though the project uses `slipcover` for coverage measurement (as configured in the `coverage_report` nox session). ## Code Location - File: `pyproject.toml`, lines 65-68 (pytest dependencies in `dev` extras) - File: `pyproject.toml`, lines 172-198 (`[tool.coverage]` section for coverage.py) ## Impact 1. Installing `.[dev]` installs pytest, which is a prohibited framework 2. The `[tool.coverage]` section is misleading — it configures coverage.py but the project uses slipcover 3. Developers may accidentally use pytest for tests, violating the BDD-only mandate 4. The presence of pytest in dependencies may cause confusion about the intended test framework ## Steps to Reproduce 1. Open `pyproject.toml` 2. Look at `[project.optional-dependencies]` → `dev` section 3. Observe `pytest>=8.0.0`, `pytest-asyncio>=0.23.0`, `pytest-cov>=4.1.0` listed 4. Also observe `[tool.coverage]` section (coverage.py config) despite slipcover being used ## Suggested Fix 1. Remove `pytest>=8.0.0`, `pytest-asyncio>=0.23.0`, `pytest-cov>=4.1.0` from the `dev` optional dependencies 2. Remove or replace the `[tool.coverage]` section with a `[tool.slipcover]` section if needed, or remove it entirely since slipcover is configured via nox session arguments ## Subtasks - [ ] Remove `pytest>=8.0.0`, `pytest-asyncio>=0.23.0`, and `pytest-cov>=4.1.0` from `[project.optional-dependencies]` → `dev` in `pyproject.toml` - [ ] Remove or replace the `[tool.coverage]` section in `pyproject.toml` (coverage.py config is misleading when slipcover is used) - [ ] Verify no other references to pytest remain in `pyproject.toml` or project configuration files - [ ] Run `nox` (all default sessions) and confirm all stages pass - [ ] Verify coverage ≥ 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - [ ] All subtasks above are completed and checked off. - [ ] `pytest`, `pytest-asyncio`, and `pytest-cov` are absent from all dependency sections of `pyproject.toml`. - [ ] The `[tool.coverage]` section is removed or replaced with correct slipcover configuration. - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - [ ] All nox stages pass. - [ ] Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 21:07:11 +00:00
freemo removed this from the v3.7.0 milestone 2026-04-06 23:31:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#3651
No description provided.