pytest-dev / pytest-dev/pytest-factoryboy

Possible for `register` to use factory docstring

Open
#93 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
400
Forks
44
Avg merge
6h 34m
Merged PRs (30d)
1

Description

Using the convenience register method to register fixtures does not import the docstring. Running pytest --fixtures results in no docstring available for all pytest-factoryboy fixtures.
It would be nice to include a docstring arg to the register method e.g

register(UserFactory, _name="special_user", _docstring="Useful sentence describing this fixture")

Thanks for the library it is very handy!

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 by locating the convenience register method and the path used to expose pytest-factoryboy fixtures to pytest. Reproduce the current output with pytest --fixtures, then verify that the proposed _docstring argument makes the supplied text appear for the registered fixture.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.