UAT: pytest, pytest-asyncio, and pytest-cov listed as dev dependencies despite CONTRIBUTING.md forbidding pytest-style unit tests #5643

Open
opened 2026-04-09 08:03:57 +00:00 by HAL9000 · 1 comment
Owner

Background and Context

CONTRIBUTING.md explicitly states under Testing Philosophy:

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. This ensures tests are readable, behavior-focused, and serve as living documentation.

Despite this prohibition, pyproject.toml lists pytest and related packages as dev dependencies:

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

Current Behavior

pyproject.toml includes pytest>=8.0.0, pytest-asyncio>=0.23.0, and pytest-cov>=4.1.0 in the dev optional dependencies. This:

  1. Contradicts the CONTRIBUTING.md prohibition on pytest-style unit tests
  2. Creates a risk that developers will write pytest tests instead of Behave BDD tests
  3. Suggests pytest may have been used at some point and these dependencies were never cleaned up
  4. The nox -s unit_tests session uses Behave (not pytest), confirming pytest is not the intended test runner

Expected Behavior

The dev dependencies should not include pytest or pytest-related packages. The project uses:

  • Behave for unit tests (BDD/Gherkin)
  • Robot Framework for integration tests
  • slipcover for coverage measurement

Acceptance Criteria

  • pytest, pytest-asyncio, and pytest-cov are removed from pyproject.toml dev dependencies
  • No pytest-style test files exist in the codebase (verified)
  • uv.lock is updated to reflect the removed dependencies

Supporting Information

From pyproject.toml lines 67-69:

"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",

The nox -s unit_tests session uses behave-parallel, not pytest:

behave_cmd = session.bin + "/behave-parallel"

Metadata

  • Commit Message: chore(deps): remove pytest dependencies from dev extras — project uses Behave for unit tests
  • Branch: chore/remove-pytest-deps

Subtasks

  • Remove pytest, pytest-asyncio, pytest-cov from pyproject.toml dev dependencies
  • Run uv lock to update the lock file
  • Verify nox -s unit_tests still passes
  • Verify no pytest test files exist

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created with the prescribed commit message.
  • The commit is pushed to the branch and submitted as a pull request to master, reviewed, and merged.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Background and Context CONTRIBUTING.md explicitly states under **Testing Philosophy**: > **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. This ensures tests are readable, behavior-focused, and serve as living documentation. Despite this prohibition, `pyproject.toml` lists pytest and related packages as `dev` dependencies: ```toml [project.optional-dependencies] dev = [ ... "pytest>=8.0.0", "pytest-asyncio>=0.23.0", "pytest-cov>=4.1.0", ... ] ``` ## Current Behavior `pyproject.toml` includes `pytest>=8.0.0`, `pytest-asyncio>=0.23.0`, and `pytest-cov>=4.1.0` in the `dev` optional dependencies. This: 1. Contradicts the CONTRIBUTING.md prohibition on pytest-style unit tests 2. Creates a risk that developers will write pytest tests instead of Behave BDD tests 3. Suggests pytest may have been used at some point and these dependencies were never cleaned up 4. The `nox -s unit_tests` session uses Behave (not pytest), confirming pytest is not the intended test runner ## Expected Behavior The `dev` dependencies should not include pytest or pytest-related packages. The project uses: - **Behave** for unit tests (BDD/Gherkin) - **Robot Framework** for integration tests - **slipcover** for coverage measurement ## Acceptance Criteria - [ ] `pytest`, `pytest-asyncio`, and `pytest-cov` are removed from `pyproject.toml` dev dependencies - [ ] No pytest-style test files exist in the codebase (verified) - [ ] `uv.lock` is updated to reflect the removed dependencies ## Supporting Information From `pyproject.toml` lines 67-69: ```toml "pytest>=8.0.0", "pytest-asyncio>=0.23.0", "pytest-cov>=4.1.0", ``` The `nox -s unit_tests` session uses `behave-parallel`, not pytest: ```python behave_cmd = session.bin + "/behave-parallel" ``` ## Metadata - **Commit Message**: `chore(deps): remove pytest dependencies from dev extras — project uses Behave for unit tests` - **Branch**: `chore/remove-pytest-deps` ## Subtasks - [ ] Remove `pytest`, `pytest-asyncio`, `pytest-cov` from `pyproject.toml` dev dependencies - [ ] Run `uv lock` to update the lock file - [ ] Verify `nox -s unit_tests` still passes - [ ] Verify no pytest test files exist ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created with the prescribed commit message. - The commit is pushed to the branch and submitted as a pull request to `master`, reviewed, and merged. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 08:05:57 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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#5643
No description provided.