pytest-dev / pytest-dev/pytest-bdd

Consider adding a very small working example to the repo and readme

Open
#644 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.5k
Forks
251
Avg merge
43m
Merged PRs (30d)
2

Description

Hi there,

(again a repeated thanks for this killer project. It has been fun to work with and really adds a lot to my project.)

When I was getting started out I would have appreciated a running example. I had to sort out some issues with file placement and naming, and just simple organization. The readme and various blogs show how to use it, but having something running to hack at is so much nicer.

My idea is that users could just copy a working set of files into their project or an empty dir, run it, and start from there. Something as simple as:

/ example
book.py -- a very simple class
book.feature
test_book.py

The feature would contain the basics: a background, a few scenarios (possibly with one failing so that users could tweak it), some steps with a parser, some without, and the test_book.py would just pull in all of the features.

If you'd like I can kick off an initial draft and PR a draft back to this repo. Cheers, jz

Contributor guide

Open the contributing guide

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 reviewing the README and the proposed example layout: book.py, book.feature, and test_book.py. Add a small runnable example covering a background, several scenarios, step parsers, and feature loading; done means users can copy the files and run them successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, testing
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.