pytest-dev / pytest-dev/pytest-order

Using dependency ordering with -k

Open
#64 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
210
Forks
17
Avg merge
16h 8m
Merged PRs (30d)
4

Description

I was looking at pytest-dependency and came across pytest-order.
It looks pretty neat and works in the way I was hoping it would. It's amazing how this library works !

One issue I found was that when I take the example at:
https://pytest-dev.github.io/pytest-order/stable/configuration.html#order-dependencies
And run:
pytest -k test_a
It will say 1 skipped, 1 deselected

Which becomes a bit inonvenient because if I want to run a single test, I would want the "dependencies" of that test to also run.
Is there a flag I can use to "select" my test as well as it's dependencies ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the order-dependencies example in the configuration documentation and reproduce it with pytest -k test_a. Investigate how -k selection interacts with dependency ordering, then determine whether an existing flag supports selecting dependencies or whether the behavior needs a documented change. Done means the selected test and its dependencies run together as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.