UAT: pytest, pytest-asyncio, and pytest-cov listed in [dev] dependencies — xUnit test framework should not be a project dependency #3883

Open
opened 2026-04-06 07:08:12 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/remove-pytest-dependencies-and-cache
  • Commit Message: fix(deps): remove pytest, pytest-asyncio, and pytest-cov from dev dependencies
  • Milestone: (backlog — see note below)
  • Parent Epic: #3374

Background and Context

The CONTRIBUTING.md explicitly states:

"Prefer BDD Over xUnit: Do not write xUnit-style unit tests (e.g., JUnit, pytest, NUnit, xUnit.net). All unit-level tests should be expressed as BDD scenarios in Gherkin."

The project uses Behave (Gherkin/BDD) for unit tests and Robot Framework for integration tests. pytest is explicitly prohibited as a test framework. Despite this, pytest, pytest-asyncio, and pytest-cov remain listed as [dev] optional dependencies in pyproject.toml, and a committed .pytest_cache/ directory reveals that pytest was previously run against now-deleted test files.

Current Behavior

pyproject.toml lists pytest>=8.0.0, pytest-asyncio>=0.23.0, and pytest-cov>=4.1.0 in the [dev] optional dependencies group:

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

Additionally, a .pytest_cache/v/cache/nodeids file exists in the repository containing cached pytest test IDs:

[
  "test_step_definitions.py::test_direct_array_format_backward_compatibility",
  "test_step_definitions.py::test_envelope_format_missing_lifecycle_state",
  "test_step_definitions.py::test_envelope_format_with_lifecycle_state"
]

This indicates that pytest was previously run against test_step_definitions.py (now deleted), and the cache was committed to the repository.

Expected Behavior

  • pytest, pytest-asyncio, and pytest-cov should be removed from pyproject.toml dependencies entirely
  • The .pytest_cache/ directory should be added to .gitignore and removed from the repository
  • No pytest-style tests should exist or be runnable in the project

Steps to Reproduce

grep -n "pytest" pyproject.toml
# Shows pytest in [dev] dependencies

cat .pytest_cache/v/cache/nodeids
# Shows cached pytest test IDs from previously deleted test_step_definitions.py

Acceptance Criteria

  • pytest, pytest-asyncio, pytest-cov removed from pyproject.toml
  • .pytest_cache/ added to .gitignore
  • .pytest_cache/ directory removed from repository
  • nox default sessions still pass without pytest

Subtasks

  • Remove pytest>=8.0.0, pytest-asyncio>=0.23.0, pytest-cov>=4.1.0 from [dev] dependencies in pyproject.toml
  • Add .pytest_cache/ to .gitignore
  • Remove .pytest_cache/ directory from repository (via git rm -r --cached .pytest_cache/)
  • Run nox and verify all default sessions pass
  • Verify coverage >= 97% via nox -s coverage_report
  • Submit PR

Definition of Done

This issue is complete when:

  • pytest, pytest-asyncio, and pytest-cov removed from all dependency groups in pyproject.toml
  • .pytest_cache/ added to .gitignore and removed from the repository
  • No pytest-style tests exist or are runnable in the project
  • 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%

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


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

## Metadata - **Branch**: `fix/remove-pytest-dependencies-and-cache` - **Commit Message**: `fix(deps): remove pytest, pytest-asyncio, and pytest-cov from dev dependencies` - **Milestone**: *(backlog — see note below)* - **Parent Epic**: #3374 ## Background and Context The CONTRIBUTING.md explicitly states: > "Prefer BDD Over xUnit: Do not write xUnit-style unit tests (e.g., JUnit, pytest, NUnit, xUnit.net). All unit-level tests should be expressed as BDD scenarios in Gherkin." The project uses Behave (Gherkin/BDD) for unit tests and Robot Framework for integration tests. `pytest` is explicitly prohibited as a test framework. Despite this, `pytest`, `pytest-asyncio`, and `pytest-cov` remain listed as `[dev]` optional dependencies in `pyproject.toml`, and a committed `.pytest_cache/` directory reveals that pytest was previously run against now-deleted test files. ## Current Behavior `pyproject.toml` lists `pytest>=8.0.0`, `pytest-asyncio>=0.23.0`, and `pytest-cov>=4.1.0` in the `[dev]` optional dependencies group: ```toml [project.optional-dependencies] dev = [ ... # Testing "behave==1.3.3", "pytest>=8.0.0", "pytest-asyncio>=0.23.0", "pytest-cov>=4.1.0", ... ] ``` Additionally, a `.pytest_cache/v/cache/nodeids` file exists in the repository containing cached pytest test IDs: ```json [ "test_step_definitions.py::test_direct_array_format_backward_compatibility", "test_step_definitions.py::test_envelope_format_missing_lifecycle_state", "test_step_definitions.py::test_envelope_format_with_lifecycle_state" ] ``` This indicates that pytest was previously run against `test_step_definitions.py` (now deleted), and the cache was committed to the repository. ## Expected Behavior - `pytest`, `pytest-asyncio`, and `pytest-cov` should be removed from `pyproject.toml` dependencies entirely - The `.pytest_cache/` directory should be added to `.gitignore` and removed from the repository - No pytest-style tests should exist or be runnable in the project ## Steps to Reproduce ```bash grep -n "pytest" pyproject.toml # Shows pytest in [dev] dependencies cat .pytest_cache/v/cache/nodeids # Shows cached pytest test IDs from previously deleted test_step_definitions.py ``` ## Acceptance Criteria - `pytest`, `pytest-asyncio`, `pytest-cov` removed from `pyproject.toml` - `.pytest_cache/` added to `.gitignore` - `.pytest_cache/` directory removed from repository - `nox` default sessions still pass without pytest ## Subtasks - [ ] Remove `pytest>=8.0.0`, `pytest-asyncio>=0.23.0`, `pytest-cov>=4.1.0` from `[dev]` dependencies in `pyproject.toml` - [ ] Add `.pytest_cache/` to `.gitignore` - [ ] Remove `.pytest_cache/` directory from repository (via `git rm -r --cached .pytest_cache/`) - [ ] Run `nox` and verify all default sessions pass - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Submit PR ## Definition of Done This issue is complete when: - [ ] `pytest`, `pytest-asyncio`, and `pytest-cov` removed from all dependency groups in `pyproject.toml` - [ ] `.pytest_cache/` added to `.gitignore` and removed from the repository - [ ] No pytest-style tests exist or are runnable in the project - [ ] 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% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
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#3883
No description provided.